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?
__cplusplus
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 value 201402L when compiling a C++ translation unit.
1 The following macro names shall be defined by the implementation:
The name __cplusplus is defined to the value 201402L when compiling a C++ translation unit.
201402L
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?
2.1m questions
2.1m answers
60 comments
57.0k users