C++11 features in Visual Studio 2012

61,400

Solution 1

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:

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

Solution 2

Here is the list of feature of the new visual studio version and here is the list of what all compilers support

Solution 3

There is a list there. What strikes me the most is the features which are still missing:

  • They said they would implement variadic templates as a priority and they didn't.
  • We will still have to declare move constructors by hand for many classes, since there is no delegating constructors.
  • Inheriting constructors aren't present, and this would really be needed for some code
  • No uniform initialization, in particular no initializer lists. This sucks when you have used them with g++.
  • Still no correct thread local storage. So you're stuck with boost::thread_specific_ptr for a while.

All the other features which are yet missing are mainly stuff you can live without. What I list here is just what nags me everyday when working with VS10. It's just so irritating that they didn't work on the compiler at all.

EDIT: I shall also add that emplace_back (one great feature for the standard library containers) isn't correctly implemented.

Solution 4

During GoingNative in Feb 2012, STL announced that range-for will be in VS11 starting with the beta, which is expected Feb 29th. A recording of the talk is available. "The Reveal" is at the one-hour 38 minute mark.

Solution 5

There is now a definitive list of C++11 features in VS2010 and VS2012 on MSDN.

Share:
61,400
HighCommander4
Author by

HighCommander4

Updated on April 06, 2020

Comments

  • HighCommander4
    HighCommander4 about 4 years

    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).

  • HighCommander4
    HighCommander4 over 12 years
    That's actually quite disappointing... I was hoping for variadic templates and uniform initialization, which GCC has been supporting for two and half and one and a half years, respectively...
  • Joel Coehoorn
    Joel Coehoorn over 12 years
    @High uniform initialization isn't even on their list of features in the spec (doesn't even show up with a "No"). Is there perhaps another name for that?
  • deft_code
    deft_code over 12 years
    I really love my type safe print and printf functions. I was really hoping that 2011 would finally add variadic templates. Missing variadics is also effecting emplace_back and make_shared. Is there something about cl that makes it particularly hard to implement variadics?
  • Kate Gregory
    Kate Gregory over 12 years
    Herb Sutter said in his second Build session (channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-835T) that they tried to do variadic templates ... tried and tried and they are not done in time for this version. This affected what other things they could do, as well.
  • HighCommander4
    HighCommander4 over 12 years
    Nice find! He also said in the same talk that we will not have to wait 2-3 years for a version that includes variadic templates - that's encouraging.
  • Chris Hill
    Chris Hill over 11 years
    Here is a good comparison of different compilers on C++11. wiki.apache.org/stdcxx/C++0xCompilerSupport Good rule: don't use C++11 in GCC and expect it to compile in VS2012