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 250612 - STL auto completion non-existent
Summary: STL auto completion non-existent
Status: RESOLVED INCOMPLETE
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: petrk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-22 17:31 UTC by xpnctoc
Modified: 2015-04-07 10:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example project where code complete fails to resolve STL template implementations (10.59 KB, application/x-zip-compressed)
2015-03-26 00:12 UTC, xpnctoc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xpnctoc 2015-02-22 17:31:46 UTC
I really like your IDE but the apparent inability for autocomplete to fully resolve STL syntax is a deal breaker :-( For example, a very basic program:

#include <iostream>
#include <vector>
using namespace std;

class CWorker
{
public:
    CWorker() {}
    int GetMagicNumer() { return 42; }
};

int main()
{
    vector<CWorker> vec;
    vec.push_back( CWorker() );

    /* autocomplete fails to resolve vec[0]. below */
    cout << vec[0].GetMagicNumber();

    /* autocomplete fails to resolve it-> below */
    for( vector<CWorker>::iterator it = vec.begin(); it != vec.end(); ++it )
    {
        cout << it->GetMagicNumber();
    }

    return 0;
}

Please please please please please please enhance autocomplete to fully resolve STL template classes and their iterators.
Comment 1 petrk 2015-03-23 00:01:40 UTC
I assume that you are using C++11 because in previous version of standard everything worked fine. This looks like duplicate of Bug 248600 (and Bug 248747) which were fixed in development version. So, can you please download daily build and check your example in it?

BTW, code snippet has typo mistake - method is named GetMagicNumer instead of GetMagicNumber

*** This bug has been marked as a duplicate of bug 248600 ***
Comment 2 xpnctoc 2015-03-26 00:12:48 UTC
Created attachment 152846 [details]
Example project where code complete fails to resolve STL template implementations
Comment 3 xpnctoc 2015-03-26 00:16:48 UTC
I have attached a sample project. The issue is NOT fixed as of daily build 201503250001. I noticed several other issues say not to use "using namespace std" so I updated my code to remove that, but doing so had no effect.

Also, I am not using C++ 11. My compiler is VS 2008, so I have to write code that is compatible with that.
Comment 4 petrk 2015-03-30 16:41:40 UTC
I've checked daily build on Windows 7 with VS2008 (using plugin VCC4N) and the test project works fine. _MSC_VER macro equals 1500.

Can you navigate to included files with hyperlink? If yes, then go back to main.cpp, press Ctrl+Alt+Shift+M and check "Preprocessor states" checkbox. IDE will dump preprocessor states in output window. Please, post them here.
Comment 5 petrk 2015-04-07 10:36:53 UTC
Changed status to incomplete because of lack of information