I'm looking to setup some preprocessor stuff, and I'd like a more exact number for what __cplusplus
in C++14 should be defined as. Is there one mandated by the standard?
I'm looking to setup some preprocessor stuff, and I'd like a more exact number for what __cplusplus
in C++14 should be defined as. Is there one mandated by the standard?
N3936* §16.8 [cpp.predefined]/p1:
1 The following macro names shall be defined by the implementation:
__cplusplus
The name
__cplusplus
is defined to the value201402L
when compiling a C++ translation unit.
N3936 is the final working draft that became C++14, and the number 201402L
is consistent with the meeting at which the C++14 standard is sent out for final balloting (February 2014).
*Those interested in obtaining a copy of the C++ standard should check out Where do I find the current C or C++ standard documents?