Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » in C++ 11 mode, methods on STL container elements cannot be parsed
in C++ 11 mode, methods on STL container elements cannot be parsed [message #965709] Wed, 31 October 2012 12:56
Peter Holzkorn is currently offline Peter HolzkornFriend
Messages: 1
Registered: October 2012
Junior Member
I'm using Eclipse Juno with CDT to develop my C++ project with custom makefile. I am also using C++11 features, enabled by adding '-std=c++11' in 'discovery options' and adding '__GXX_EXPERIMENTAL_CXX0X__' under 'paths and symbols'.

The problem is that with C++ 11 enabled, Eclipse is unable to parse methods or fields accessed on STL container elements. E.g.:

typedef struct _PlayerCalibrationData {
    std::string getSamplesStr()
} PlayerCalibrationData;

std::vector<MainApp::PlayerCalibrationData> m_calibrationData;


getSamplesStr() will be underlined and marked as an error, with the message "Method 'getSamplesStr' could not be resolved".

The compiler doesn't complain, though, regardless of whether I invoke it from Eclipse or from the command line.

Also, when I type m_calibrationData., all vector methods pop up via content assist (i.e. it's not an issue of Eclipse not finding the vector include), but as soon as I access an element via [] or at(), content assist is quiet and anything typed manually is marked as an error.

If I disable C++ 11 support, this problem doesn't appear - but then the parser obviously complains about 'unique_ptr's etc.
Previous Topic:my application still run after closing(ubuntu)
Next Topic:Help! Indexer and auto-complete don't recognize some STL objects
Goto Forum:

Current Time: Tue May 22 08:09:32 GMT 2018

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

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

Back to the top