C++ features in Visual C++11, yeah!

Recently Microsoft surprised me – positively! – with supporting newfangled C++11 features in the November CTP of their Visual C++ 11.0 compiler:

  • Variadic templates
  • Uniform initialization and initializer_lists
  • Delegating constructors
  • Raw string literals
  • Explicit conversion operators
  • Default template arguments for function templates

The library has not yet been updated to take advantage, but still this means that it’s now possible to avoid macro hell for things such as makeUnique (but unforutunately not yet for e.g. platform-specific Unicode strings, no support yet for the newfangled literals).

On the other hand, Visual C++ implements the regexp library, while g++ does not. And Visual C++ has working exceptions, while AFAIK the dang[1] compiler still has not. So this may just look as if Visual C++ is now overtaking g++ and the dang compiler in the race to support the C++11 standard! 🙂

[1] As Brian Keminghan remarked, dang if I can remember its name!