Home  >  Article  >  Backend Development  >  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?

Barbara Streisand
Barbara StreisandOriginal
2024-11-04 18:51:02251browse

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."

The above is the detailed content of Why is __cplusplus defined as 199711L in Visual Studio 2012 despite C 11 support?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn