Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332522 - c++0x mode autodetection.
Summary: c++0x mode autodetection.
Status: CLOSED DUPLICATE of bug 404913
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 minor with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 09:08 EST by German CLA
Modified: 2013-07-22 01:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description German CLA 2010-12-14 09:08:32 EST
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.
Comment 1 Hering Cheng CLA 2012-06-06 11:44:29 EDT
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?
Comment 2 Andrew Gvozdev CLA 2012-06-06 12:10:02 EDT
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.
Comment 3 Hering Cheng CLA 2012-06-07 09:38:38 EDT
Thank you, Andrew.  This is an awesome hidden jewel.  Now I understand the new CDT better.
Comment 4 Andrew Gvozdev CLA 2013-07-22 01:18:44 EDT

*** This bug has been marked as a duplicate of bug 404913 ***