Disabling C ++ 11 functions on VS2012

Is it possible to disable C ++ 11 features on VS2012? My code is not ready for this yet, and I would not want to introduce further confusion.

+6
source share
3 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" functions)

Relevant command line switches:

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

Right click on the project -> Properties -> General -> Platform Toolkit -> Visual Studio 2010

This will compile the project with the Visual Studio 2010 compiler.

0
source

Yes, you can disable C ++ 11 functions in the Visual C ++ compiler. The /Tc compiler option will throw errors for C ++ 11 syntax.

Unfortunately, C ++ 03 and C ++ 98 will be collateral damage. There are only C89 left, as well as several Microsoft extensions, such as support //single line comments .

-1
source

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


All Articles