Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse CDT indexing and std::unique_ptr
Eclipse CDT indexing and std::unique_ptr [message #787356] Tue, 31 January 2012 13:48
Christos Gitsis is currently offline Christos GitsisFriend
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
Previous Topic:How to delete a repository?
Next Topic:repository folder structure and sharing the eclipse IDE files for rebuilding
Goto Forum:
  


Current Time: Fri Apr 26 07:53:16 GMT 2024

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

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

Back to the top