C++ ISO Standards and Microsoft Visual Studio/MSBuild/build tools/platform toolset
2025年1月3日Prior to Visual Studio 2017, the MSVC C++ compiler did not have any mechanism to specify C++ language version. In those days, the compiler only supported one, default, mode that included any language feature that had been implemented (irrespective of the C++ standard version). In VS 2017, the /std:c++* switch to control C++ language version was added to our compiler. At that point in time, we had already begun implementing C++14 language features and decided to implement the compiler’s minimum language feature level as C++14 (/std:c++14). This decision was made primarily due to compatibility concerns with previous releases of the compiler.
https://developercommunity.visualstudio.com/t/Need-C11-in-visual-studio-not-C11-or/10081597
Q: Which version of a Microsoft product can compile C++20 code?
Visual Studio 2019 version 16.11 starts to compile C++20.[1]
The version of Microsoft Visual C++ compiler is not directly related to the code standards it compiles because there is no such a downloadable called Microsoft Visual C++ compiler. Microsoft Visual C++ compiler is bundled with Visual Studio or at least Build Tools for Visual Studio.
If you do not need GUI, you can merely download “Build Tools for Visual Studio 2019” on https://visualstudio.microsoft.com/vs/older-downloads/.
Q: Which version of a Microsoft product can compile C++17 code?
Support for C11 and C17 standards is available in Visual Studio 2019 version 16.8 and later.[2]
Q: Which version of a Microsoft product can compile C++14 code?
The MSVC compiler in Visual Studio 2017 version 15.0 is now complete for features added in the C++14 standard.[3]
See also https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance
参考资料
- Daniel Griffing. MSVC C++20 and the /std:c++20 Switch. . 2021-09-21 [2025-01-03].↑
- . Install C11 and C17 support in Visual Studio. . 2021-10-29 [2025-01-03].↑
- . C++ Conformance improvements, behavior changes, and bug fixes in Visual Studio 2017. . 2022-06-06 [2025-01-03].↑