Electronic – How to enable c++11 support for Atmel Studio

atmel-studioavrc

I am currently using Atmel Studio 7 and I need to enable c++11 support for it. I couldn't find any documentation about this topic. Moreover, I am not even sure it has c++11 support, yet.

Best Answer

I just started a new C++ project under Atmel Studio 7 and with the default options the following code failed with a nullptr not declared error:

char *c;
if (c == nullptr)
    ;

Then I went into the Toolchain options under the project properties and added the -std=c++11 flag as suggested by Grebu under the "other flags" which seemed like the best place for it and it compiled fine:

Atmel Studio with C++ 11 enabled