How do you enable C++11 syntax in Eclipse Neon?

  1. Right click on your project and click Properties
  2. Navigate to C/C++ General and Preprocessor Include Paths, Macros etc.
  3. Select the Providers tab, click on compiler settings row for the compiler you use.
  4. Add -std=c++11 to Command to get compiler specs.
  5. Apply changes.

Will look something like this:

${COMMAND} -E -P -v -dD "${INPUTS}" -std=c++11

You can also do the following

  1. go to project properties (alt enter)
  2. In the left pane, scroll to "C/C++ Build", collapse it, select settings.
  3. 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,

  1. Properties --> "C/C++ Build" --> collapse and and select "Settings"
  2. Under the Tool settings tab, select your compiler, and highlight the "Miscellaneous" field.
  3. add -std=c++11 to the "Other flags" input field.