Community
Participate
Working Groups
Build Identifier: I20101208-1300 When I create a project, I always have to configure my project so that it detects c++0x completion and so on. It would be nice to have some kind of detection or project option with c++0x enabled by default, since __GXX_EXPERIMENTAL_CXX0X__ has to be defined for gcc in paths and symbols in order to get completion working, besides defining the -std=c++0x flag. Reproducible: Always Steps to Reproduce: 1. Create new project 2. Add to Miscellaneous C++ compiler flags "-std=c++0x" 3. Even with that flag, c++0x headers such as std::array and forward_list don't work.
Is there any plan on making this happen soon? I am using CDT 8.1.0.201205261005 in Eclipse Version: 4.2.0 Build id: I20120503-1800 and still have to manually add the macro in "Project -> Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> CDT User Setting Entries", despite having specified "-std=c++11" in "Project -> Properties -> C/C++ Settings -> GCC C++ Compiler -> Miscellaneous". I am using g++ 4.7.0. Am I missing something?
If you use language settings providers (as evidenced by reference to "Preprocessor Include Paths, Macros etc.") you can add the flag to built-in specs detector. On that property page select [Providers] tab and "GCC Builtin Compiler Settings" (should be enabled in your project), then use link "Workspace Settings"->Discovery tab, and add "-std=c++11" to the list of options. Or you can go directly to Preferences->C/C++->Build->Settings->Discovery. That will supply c++11 mode for all projects in workspace using the provider.
Thank you, Andrew. This is an awesome hidden jewel. Now I understand the new CDT better.
*** This bug has been marked as a duplicate of bug 404913 ***