Eclipse NEON.1 4.6.1 with CDT 9.1.0, g++ 5.4.0
It doesn't recognize all c++11/14 features. It does recognize keywords like auto and nullptr. It doesn't however recognize things coming from headers which depend on the correct symbols being defined.
For instance when including it recognizes old symbols like std::auto_ptr not knew ones like std::shared_ptr. These newer features are within an #if __cplusplus >= 201103L.
I can get it to work for a standard eclipse project by setting the dialect option but I need it to work with an autotools based project which doesn't have a dialect setting.
I have the actual compilation of the program working using AM_CXXFLAGS automake variable. To get it to work for the indexer I went in eclipse to Project properties > C/C++ General > Preprocessor Include Paths, Macros
Then to the providers tab and added -std=c++14 option to the command for the CDT GCC Built-in Compiler settings. I also moved that provider to the top of the list. On the entries tab you can see the actual value of the __cplusplus define. Before I added the -std=c++14 switch it was wel below the required 201103L after I added the switch it was well above.
Aucun commentaire:
Enregistrer un commentaire