UPDATE: I sent the original answer for a long time, and it is out of date. I checked twice today (March 15, 2014): in Eclipse Kepler (Build id 20130614-0229) is enough
add to Project> Properties> C / C ++ Build> Settings, and then on the Tool Settings tab CCC C ++ Compiler> -std=c++11 flag -std=c++11 ,
then in the menu "Window"> "Settings"> "C / C ++> Build" on the tab "Detection", the parameters of the built-in CDT GCC compiler are selected and add the -std=c++11 flag to the command to get the compiler specifications. On my machine, it looks after the change:
${COMMAND} -E -P -v -dD -std=c++11 "${INPUTS}"
clean and rebuild your project and your index (Project> C / C ++ Index> Rebuild), because Eclipse tends to cache error messages and display them even if they disappear after changing the setting.
It really works on my machine. If this is not the case, you can take a snapshot: C ++ 11 has full support for Eclipse , although I am not sure of the correctness of this approach and I do not need to do this on my machine. As of March 7, 2014, users said that they helped them, while the above approach did not.
Original post now deprecated:
This seems to be a false error from the IDE.
Click on project properties, then C / C ++ General> Code Analysis> Syntax and semantic errors and deselection type cannot be resolved.
I also had to disable a bunch of other syntax and semantic errors, such as invalid arguments, invalid overloading, Symbol not allowed, etc. in my own projects. These dummy errors come from Codan .
(You may need to add __GXX_EXPERIMENTAL_CXX0X__ to the define / preprocessor macros, but not sure about that.)
Strike>
Ali
source share