Boost logo

Boost :

Subject: Re: [boost] C++17 detection
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2017-09-12 00:15:27


[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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk