5

I got the community version of Visual Studio 2013 and I thought that c++11 was supposed to be enabled by default.

However, the macro __cplusplus has a value of 199711L (c++98) rather than 201103L (c++11). Furthermore, if I try to run c++11 specific code (likeconstexpr int a = 5;) it gives an error in the compiler. How do I enable c++11?

1 Answers1

8

That the value of __cplusplus is still 199711L is a bug, which has been reported to Microsoft.

That shouldn't stop you from writing and compiling C++11 code. It should just work (nothing special to configure).

Beware that Visual Studio 2013's C++11 implementation is not complete. Among the unsupported features is constexpr, which explains why you're getting a compile error ;-)

misha256
  • 11,393