On 12/09/2017 12:15, Stephan T. Lavavej wrote:
[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. I know it's intentional; that wasn't my point. It wasn't intended as a disparagement, just a statement of fact.
Although having said that, while I can understand the desire to not update it until the standard is fully implemented, it does seem a bit peculiar to do that -- and inconsistent with what GCC/Clang do (they just indicate which version is requested on the command line), so I don't know why you'd get a riot for doing the same as them. In fact I would think that would be a better thing to do, to improve consistency between compilers.