Visual Studio's C++14 Support Grows
Back in July, Microsoft had released a roadmap for the integration of modern C++ into Visual Studio. At that time it solidified what C++ language features would be available in VS2013, and now a new CTP is available bringing VC++ closer to C++14 compliance.
Titled Visual C++ Compiler November 2013 CTP, this package provides the following features:
- Implicit move special member function generation (thus also completing =default)
- Reference qualifiers on member functions (a.k.a. "& and && for *this")
- Thread-safe function local static initialization (a.k.a. "magic statics")
- Inheriting constructors
- Extended sizeof
- constexpr (except for constructors)
- noexcept (unconditional)
- C++14 decltype(auto)
- C++14 auto function return type deduction
- C++14 generic lambdas (with explicit lambda capture list)
- (Proposed for C++17) Resumable functions and await
An important detail for early-adopters interested in this package—it does not include a “Go Live” license meaning it cannot be used for production code deployment. According to Microsoft’s Stephen T. Lavavey, a “Go Live” license will not be available with this or future VC++ CTPs for VS2013. In short VS Next will be the soonest these features will be available for use in a production setting. Also per Lavavey, the following C++11 core language features remain outstanding: “expression SFINAE, attributes (including those for data-dependency ordering), constexpr on member functions, char16_t/char32_t, Unicode string literals, universal character names in literals, user-defined literals, inline namespaces, unrestricted unions, conditional noexcept, thread_local, [and] a C99-conformant preprocessor…”
Microsoft has produced a document listing some of the pain points that you may encounter when using this CTP. Notably the new keywords are not supported by IntelliSense and some areas of the IDE. Additional areas to be aware of are that the await keyword requires Windows 8.1 and when using destructors with the CTP, avoid throwing exceptions.