How do you enable C++11 syntax in Eclipse Neon?
- Right click on your project and click Properties
- Navigate to C/C++ General and Preprocessor Include Paths, Macros etc.
- Select the Providers tab, click on compiler settings row for the compiler you use.
- Add -std=c++11 to Command to get compiler specs.
- Apply changes.
Will look something like this:
${COMMAND} -E -P -v -dD "${INPUTS}" -std=c++11
You can also do the following
- go to project properties (alt enter)
- In the left pane, scroll to "C/C++ Build", collapse it, select settings.
- In the right pane, select and collapse your compiler under the Tool Settings menu, select"Dialect", choose your languange standard from the drop down, or enter -std=c++11 in the "other dialect flags" text input.
Alternatively,
- Properties --> "C/C++ Build" --> collapse and and select "Settings"
- Under the Tool settings tab, select your compiler, and highlight the "Miscellaneous" field.
- add -std=c++11 to the "Other flags" input field.