user3360398
user3360398

Reputation:

how to check VS c++ standard version

I am a VS user and I wanna find out info regarding to the c++ standard i am using.

i wonder how i can find out if it is c++11 standard or c++98 standard.

Upvotes: 0

Views: 1070

Answers (1)

Qaz
Qaz

Reputation: 61970

MSVC is probably not going to have an updated __cplusplus until more or all of that standard's features are implemented. See the comments on this page for more information.

Instead, use the macros available in Boost.Config to test for specific features. For example, to test whether decltype is supported, you can use:

BOOST_NO_CXX11_DECLTYPE

This will be defined if the compiler does not support decltype. Depending on your version of VS vs. your version of Boost, this might not be 100% up to date. Be sure to check that Boost version for what is supported. As Boost 1.56.0 has had major delays, I am unsure what the current status of VS support is in 1.55.0, but 1.56.0 should arrive pretty soon and I would think it would fix any outstanding issues with recent VS versions.

Upvotes: 1

Related Questions