Answered by:
C++ standards in Microsoft Visual C++ compilers

Question
-
Hallo,
What standard C ++ set as default in vc8, vc9, vc10, vc11, vc12, vc14, vc15?
If the standard is not explicitlyspecified in project.
- Moved by Jack Zhai-MSFTMicrosoft contingent staff Monday, January 14, 2019 5:17 AM
Friday, January 11, 2019 8:08 AM
Answers
-
Hello,
Thanks for posting here.
>>What standard C ++ set as default in vc8, vc9, vc10, vc11, vc12, vc14, vc15?
Traditionally, we would release the compiler in a default mode that combines features striding several versions of the C++ language, e.g. C++98, C++03, C++11, C++14, etc.
After reading several links:
https://docs.microsoft.com/en-us/previous-versions/hh567368(v=vs.140)#featurelist
https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2013/hh567368(v=vs.120)
https://stackoverflow.com/questions/15543190/major-differences-between-visual-studio-6-0-and-vs-2010-compilers
https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/
I guess maybe like this:Visual Studio 2005 : vc8 C++98
Visual Studio 2008 : vc9 C++98
Visual Studio 2010 : vc10 C++03
Visual Studio 2012 : vc11 C++03
Visual Studio 2013 : vc12 C++03
Visual Studio 2015 : vc14 C++11
Visual Studio 2017 : vc15 C++11MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
- Proposed as answer by Guido Franzke Monday, January 14, 2019 10:17 AM
- Marked as answer by Vitaly Nikolaenko Tuesday, January 15, 2019 10:59 AM
Monday, January 14, 2019 10:03 AM -
For Visual Studio 2015 and 2017 it is more complicated.
There is currently no vc15, since Visual Studio 2015 there has just been incremental steps for VC14. For example the Visual Studio 2015 toolset that comes with Visual Studio 2017 identifies itself as:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24234.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.That is version 19.0.
Visual Studio 2017 update 9 identifies itself as:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27026.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.That is 19.16.
Visual Studio 2019 preview 1.1 identifies itself as:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.20.27027.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.That is 19.20.
Because Visual C++ inherited the version numbers from Microsoft C++, the compiler version number is offset from the toolset version by 5. So all of these are version 14.
What's more, the latest versions of the C++ compiler have defaulted to C++14 with C++17 being available with a compiler option. I'm not sure if Visual Studio 2019 will change the default.
This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
- Proposed as answer by Jack Zhang - AAA Tuesday, January 15, 2019 5:31 AM
- Marked as answer by Vitaly Nikolaenko Tuesday, January 15, 2019 10:59 AM
Monday, January 14, 2019 6:47 PM
All replies
-
Hello,
Thanks for posting here.
>>What standard C ++ set as default in vc8, vc9, vc10, vc11, vc12, vc14, vc15?
Traditionally, we would release the compiler in a default mode that combines features striding several versions of the C++ language, e.g. C++98, C++03, C++11, C++14, etc.
After reading several links:
https://docs.microsoft.com/en-us/previous-versions/hh567368(v=vs.140)#featurelist
https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2013/hh567368(v=vs.120)
https://stackoverflow.com/questions/15543190/major-differences-between-visual-studio-6-0-and-vs-2010-compilers
https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/
I guess maybe like this:Visual Studio 2005 : vc8 C++98
Visual Studio 2008 : vc9 C++98
Visual Studio 2010 : vc10 C++03
Visual Studio 2012 : vc11 C++03
Visual Studio 2013 : vc12 C++03
Visual Studio 2015 : vc14 C++11
Visual Studio 2017 : vc15 C++11MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
- Proposed as answer by Guido Franzke Monday, January 14, 2019 10:17 AM
- Marked as answer by Vitaly Nikolaenko Tuesday, January 15, 2019 10:59 AM
Monday, January 14, 2019 10:03 AM -
For Visual Studio 2015 and 2017 it is more complicated.
There is currently no vc15, since Visual Studio 2015 there has just been incremental steps for VC14. For example the Visual Studio 2015 toolset that comes with Visual Studio 2017 identifies itself as:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24234.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.That is version 19.0.
Visual Studio 2017 update 9 identifies itself as:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27026.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.That is 19.16.
Visual Studio 2019 preview 1.1 identifies itself as:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.20.27027.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.That is 19.20.
Because Visual C++ inherited the version numbers from Microsoft C++, the compiler version number is offset from the toolset version by 5. So all of these are version 14.
What's more, the latest versions of the C++ compiler have defaulted to C++14 with C++17 being available with a compiler option. I'm not sure if Visual Studio 2019 will change the default.
This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
- Proposed as answer by Jack Zhang - AAA Tuesday, January 15, 2019 5:31 AM
- Marked as answer by Vitaly Nikolaenko Tuesday, January 15, 2019 10:59 AM
Monday, January 14, 2019 6:47 PM -
Thanks!)Tuesday, January 15, 2019 11:00 AM