Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++11 features in Visual Studio 2012

A preview version of Visual Studio 2012 (the next version after VS2010) is now available.

Does anyone know what new C++11 features it supports? (I'm not in a position to try it out at the moment).

like image 624
HighCommander4 Avatar asked Sep 14 '11 19:09

HighCommander4


People also ask

Does Visual Studio support C11?

Support for C11 and C17 standards is available in Visual Studio 2019 version 16.8 and later.

Do I have C++11?

To see if your compiler has C++11 support, run it with just the --version option to get a print out of the version number. Do this for whichever compiler(s) you wish to use with Rosetta. Acceptable versions: GCC/g++: Version 4.8 or later.

What is the C compiler used in Visual Studio?

Visual Studio comes with its own C compiler, which is actually the C++ compiler. Just use the . c file extension to save your source code.

Does Visual Studio 2019 use C ++ 17?

It's available starting in Visual Studio 2019 version 16.8. The /std:c17 option enables ISO C17 conformance. It's available starting in Visual Studio 2019 version 16.8.


1 Answers

It's worth noting that Visual Studio 2010 already had quite a bit of early C++11 support. So to summarize what is already linked to in other answers, here is what is new in Visual Studio 11 that was not part of Visual Studio 2010:

  • rvalue references to version 2.1 from 2.0
  • lambdas to version 1.1 from 1.0.
  • decltype to version 1.1 from 1.0(not yet available in developer preview)
  • Improved, but still incomplete, Alignment
  • completed strongly-typed enums
  • forward declared enums
  • Standard layout and trivial types
  • Atomics
  • Strong compare and exchange
  • Bi-directional fences
  • Data-dependency ordering
  • Range-based for loop

In early November 2012, Microsoft announced the Visual C++ Compiler November 2012 CTP, which adds more C++11 functionality to Visual Studio 2012:

  • uniform initialization
  • initializer lists
  • variadic templates
  • function template default arguments
  • delegating constructors
  • explicit conversion operators
  • raw strings
like image 72
Joel Coehoorn Avatar answered Oct 02 '22 18:10

Joel Coehoorn