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

Summary: Unable to resolve methods of ::std::vector class properly
Product: cnd Reporter: kosmonaffft
Component: Code ModelAssignee: petrk
Status: CLOSED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:
Attachments: Properly behavior with Vector<int>.
Unproperly behavior with Vector<double>.

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.