Visual Studio Moves Closer to C99 and C++11/14 Support
Let’s get this out of the way first: Yes, many C99 and C++11 features (like variadic templates) are coming to Visual Studio as part of Microsoft’s commitment to standards-based C/C++. Yes, this will require upgrading to Visual Studio 2013.
Microsoft’s corporate vice president of the Developer Division, S. Somasegar has released the roadmap for C++11/14 compliance as well as the incorporation of certain C99 standards. Starting with C++, Somasegar shared this statement by fellow Microsoft colleague (and Partner Program Manager) Herb Sutter:
“Visual C++ is targeting C++14, so we’re treating all the new features in C++11 and C++14 as a single bucket of work to do. We’ll do all of the features, but we’ll work on them in the order that delivers the most value soonest to customers. That means we will implement all of C++11 and C++14, but some high-value C++14 features, such as generic lambdas, should come before others from C++11.”
Including C++11 and C++14 features will not be the only additions: the VC++ compiler included with VS2013 Release to Manufacturing (RTM) will also include elements of the C99 standard: variable declarations, _Bool, compound literals, and designated initializers. C99 support is important for developers who work on many cross-platform projects, and Somasegar gives FFmpeg as one example that will be able to compile under VS2013.
Microsoft Senior Developer Stephan T. Lavavej, who works on Visual C++ Libraries, has elaborated on what to expect with VS2013 Preview/RTM as well as future versions. Lavavej went on to state that the Standard Template Library (STL) in VS2013 Preview has been rewritten to take advantage of the following C+11 features: explicit conversion, operators, initializer lists, scoped enums, and variadic templates. With VS2013 RTM, alias templates and deleted functions will also be utilized. Many areas of the STL are being rewritten, and it seems the implementation is benefitting not only from C+11 techniques but also through the removal of technical debt.
These improvements combine to improve compile time and reduced compiler memory consumption. Lavaej provides details on some rough benchmarks, but notes that the compiler team made significant revisions to the compiler in March 2013, so they are not included in this article. Despite this, he feels the incorporation of variadic templates remains a meaningful improvement.
The bug fixes, STL changes, and compiler features will all ship as part of VS2013. Lavavej explains that it is not feasible for Microsoft to include them in an update to VS2012 because of complexity, and the ability to provide greater testing resources in a formal release. Lavavej provides an extensive listing of all various bug fixes (based on C++ and STL support), which is informative for those looking to see if a specific patch will be included in VS2013.
Given the extensive dialog around what will be in future Visual Studio Updates (versus mainline RTM releases), developers looking for C++11/C++14 support should focus on what is included with VS2013 RTM edition. If it is scheduled for a post-RTM Community Technology Preview (CTP, AKA an alpha release), like C++14 generic lambdas, then developers should have to expect to purchase VS2013+N in order to receive that feature.
Shane Hastie on Distributed Agile Teams, Product Ownership and the Agile Manifesto Translation Program
Shane Hastie Apr 17, 2015