This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243663 - Unable to resolve methods of ::std::vector class properly
Summary: Unable to resolve methods of ::std::vector class properly
Status: CLOSED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.0
Hardware: PC Other
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-08 16:27 UTC by kosmonaffft
Modified: 2015-05-28 07:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Properly behavior with Vector<int>. (65.32 KB, image/png)
2014-04-08 16:29 UTC, kosmonaffft
Details
Unproperly behavior with Vector<double>. (66.01 KB, image/png)
2014-04-08 16:30 UTC, kosmonaffft
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kosmonaffft 2014-04-08 16:27:38 UTC
TestCase (required C++11, but if replace using vector = to typedefs, behaviour is same):

#include <list>
#include <vector>
#include <cstdlib>

template <typename T>
struct VectorHolder
{
    using vector = ::std::list<T>;
};

template <>
struct VectorHolder<double>
{
    using vector = ::std::vector<double>;
};

template <typename T> using Vector = typename VectorHolder<T>::vector;

/*
 * 
 */
int main(int argc, char** argv)
{
    Vector<int> intVec;
    Vector<double> doubleVec;
    intVec. // Here methods of ::std::list resolves properly
    doubleVec. // Here NB cannot properly resolve ::std::vector methods
    return 0;
}

See screenshots.
Comment 1 kosmonaffft 2014-04-08 16:29:45 UTC
Created attachment 146627 [details]
Properly behavior with Vector<int>.
Comment 2 kosmonaffft 2014-04-08 16:30:14 UTC
Created attachment 146628 [details]
Unproperly behavior with Vector<double>.
Comment 3 petrk 2014-04-09 14:54:39 UTC
This could be related with the problem from bug 243594, so, please, check it in dev version (last fix probably should be in 2014-04-09 version).
Comment 4 petrk 2014-04-18 11:24:03 UTC
I suppose it works in dev version.