Is there a way to specify the C ++ compatibility level for the Microsoft C ++ compiler?

/Tc compiler option applies only to C , but is there a way to specify the exact compatibility level for the Microsoft C++ ? Like C++11 , C++03 , C++98 ...

0
source share
2 answers

As in Visual C ++ 2015 Update 3, you can now specify the language option for the behavior of the language (apparently, this does not affect only the compliance check):

https://blogs.msdn.microsoft.com/vcblog/2016/06/07/standards-version-switches-in-the-compiler/

Unfortunately, the only parameters are "C ++ 14" (not accurate, it includes functions after C ++ 14 that were previously sent) and "C ++ Latest" (C ++ 14 plus a partial implementation of C ++ 17 and suggestions, but not “experimental” features). There are still no options to enable / disable earlier versions of the language (C ++ 98 / C ++ 03 / C ++ 11, as mentioned in the question)

Relevant command line switches:

  • /std:c++14
  • /std:c++latest
+1
source

No, the Microsoft compiler does not provide custom compatibility. This is what it is.

+2
source

Source: https://habr.com/ru/post/949849/


All Articles