Eclipse CDT indexing and std::unique_ptr [message #787356] |
Tue, 31 January 2012 13:48 |
Christos Gitsis Messages: 1 Registered: January 2012 |
Junior Member |
|
|
I am using std::unique_ptr in this piece of code which compiles (I use my makefile with the -std=c++0x option passed to g++) and runs as I expected.
std::stringstream out;
out << std::setw(3) << std::setfill('0') << i;
std::unique_ptr<std::string> s(new std::string(out.str()));
s->insert(s->end()-2, 1, '.');
return std::move(s);
However, I am getting error messages from Eclipse CDT. At the fourth line: Method 'insert' could not be resolved, Method 'end' could not be resolved. The same error I get a little later: I have a std::unique_ptr<std::vector>, and access to its size() method is underlined with a red line.
Previously, I was also getting errors on appearances of the name std::unique_ptr. This was solved by setting the pre-processor symbol 'GXX_EXPERIMENTAL_CXX0X' and rebuilding the index.
Is there a way to make CDT understand that it should look in std::string for s->insert() and s->end() ?
PS: I am using Eclipse 3.7.1 and CDT 8.0.0.201106081058
|
|
|
Powered by
FUDForum. Page generated in 0.03892 seconds