Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Help! Indexer and auto-complete don't recognize some STL objects
Help! Indexer and auto-complete don't recognize some STL objects [message #966173] Wed, 31 October 2012 20:24
Scott Bell is currently offline Scott BellFriend
Messages: 5
Registered: July 2009
Junior Member
Rather than pepper my code with 'using namespace std' everywhere as this is primarily a set of code modules, is there a good way to tell the CDT that std is my default namespace? PS: There is no issue compiling and running, only with the indexer. PPS: It works if I replace 'string' with 'std::string' however this would mean changing it everywhere in hundreds of thousands of lines of code Smile A lot of which I didn't write and our QA people would freak out.

Here is an example:
(this method is defined thusly in the header for this class)
  virtual void treatNull(string& i_val) {
    if (isNull(i_val))

(it is used like this)

This line generates this from Eclipse:
    Invalid arguments '
    Candidates are:
    void treatNull(char &)
    void treatNull(short int &)
    void treatNull(int &)
    void treatNull(long int &)
    void treatNull(char *)
    void treatNull(char *, int)
    void treatNull(? &)

Note the last treatNull there...that one is the one that is actually defined as taking a string above.

I have, as I mentioned, lots of code which I did not write that would have to be modified as they all assume the the default namespace is std.
Previous Topic:in C++ 11 mode, methods on STL container elements cannot be parsed
Next Topic:Indexer indexes what it shouldn't
Goto Forum:

Current Time: Thu Apr 26 17:40:42 GMT 2018

Powered by FUDForum. Page generated in 0.01792 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software