
12 Sep
2017
12 Sep
'17
12:15 a.m.
[Gavin Lambert]
__cplusplus gives you the claimed conformance level of the compiler, which is usually (though not necessarily) in agreement with the STL. But that doesn't do you a lot of good as it's a big catch-all (and at least in the case of MSVC lags behind the actual individual feature support).
That's intentional. If we were to update __cplusplus's value before completing C++11 (not to mention C++14/17), the Internet would riot. _MSVC_LANG reports the value that __cplusplus would have (in the recent versions that support /std:c++14, /std:c++latest, and now /std:c++17). Note that it isn't a claim to implement literally everything in the corresponding Standard. STL