"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Why is __cplusplus defined as 199711L in Visual Studio 2012 despite C++ 11 support?

Why is __cplusplus defined as 199711L in Visual Studio 2012 despite C++ 11 support?

Published on 2025-01-18
Browse:111

Why is __cplusplus defined as 199711L in Visual Studio 2012 despite C   11 support?

__cplusplus in Visual Studio 2012

In Visual Studio 2012, some developers have noticed that __cplusplus is defined as 199711L, indicating the "old" C standard, despite the fact that VS 2012 includes C 11 support.

Background

The __cplusplus macro is a preprocessor macro that provides the version of the supported C standard in Visual Studio. A value of 199711L corresponds to the C 98 standard, while 201103L would indicate C 11 support.

Issue

In Visual Studio 2012, even if C 11 headers are included, __cplusplus is still incorrectly defined as 199711L. This can be problematic for code that relies on the __cplusplus macro to differentiate between versions of the C standard.

Resolution

The issue has been reported to Microsoft for review, and appears under the title "A value of predefined macro __cplusplus is still 199711L."

Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3