If you have read Jason Zander’s post earlier today, you know that Visual Studio 2012 has been released to the web! Check out the MSDN Subscriber Download Page and the Visual Studio product website. This release has brought a huge amount of new value for C++ developers. Here are the highlights:
C++11 Standards Support
Language Support
- Range-based for loops. You can write more robust loops that work with arrays, STL containers, and Windows Runtime collections in the form for ( for-range-declaration : expression ).
- Stateless lambdas, which are blocks of code that begin with an empty lambda introducer [] and capture no local variables, are now implicitly convertible to function pointers as required by the C++11 Standard.
- Scoped enumerations support. The C++ enum class enum-key is now supported.
Standard Template Library
- We’ve added support for the new STL headers: <atomic>, <chrono>, <condition_variable>, <filesystem>, <future>, <mutex>, <ratio>, and <thread>.
- SCARY iterators. As permitted but not required by the C++11 Standard, SCARY iterators have been implemented.
Here is the detailed discussion on C++ 11 features in Visual Studio 2012, with links to the corresponding C++ 11 specs. Please also see the fun video series on STL … by STL.
Parallel Programming
Compiler and Linker
We’ve made major investments to help developers make the most of their target hardware. We are introducing the auto-vectorizer to take advantage of SSE2 instructions to make your loops go faster by doing 4 number operations at time, auto-parallelizer to automatically spread your work on many CPUs, and C++ AMP (C++ Accelerated Massive Parallelism) to leverage the power of GPU for data parallel algorithms. Note that C++ AMP also comes with a first-class debugging and profiling support.
Libraries (PPL)
We continue to enhance the breadth and depth of Parallel Patterns Libraries (PPL). In addition to major investments in async programming, we’ve added more to algorithms and concurrent collections. We are also working very hard in bringing most of these concepts into the next revision of the C++ standard.
Debugging
In addition to the Parallel Tasks window and Parallel Stacks window, Visual Studio 2012 offers a new Parallel Watch window so that you can examine the values of an expression across all threads and processes, and perform sorting and filtering on the results.
C++ for Windows 8
- Native XAML-based UI model: For Windows 8 Store applications, you can use the native XAML-based UI model.
- Visual C++ Component Extensions: These extensions simplify consumption of Windows Runtime objects, which are a necessary part of the new Windows 8 apps. For more information, see Roadmap for Windows 8 Store apps using C++ and Visual C++ language reference
- DirectX apps and games: You can develop graphically rich apps and games by using the new DirectX support. We’ve added tools for working with graphics assets, and debugging support for Direct3D-based programming. The graphics asset and debugging tools can also be used for developing desktop apps.
- Windows Runtime Component DLL development: Component DLL development makes the Windows Runtime environment extensible.
Note: XAML/DirectX interop :Developers targeting Windows 8 Store apps can use both XAML and DirectX in the same app, which allows developers to build flexible user interfaces like the one in FreshPaint app.
IDE
In addition to the general Visual Studio IDE improvements like the new Solution Explorer, Preview Tabs, new Find, Compare, and Asynchronous Solution Load etc., we’ve made several IDE enhancements that are new for C++ and help C++ developers be more productive with Visual Studio.
- C++ Code Snippets. The IDE now adds the skeleton code for common C++ code constructs like switch, if-else, for loop, etc. automatically. Select a code snippet from the List Members drop-down list to insert it into your code and then fill in the required logic. You can also create your own custom code snippets for use in the editor.
- Semantic Colorization. C++ code editor now conveys semantic structure of the code by colorizing types, enumerations, macros, and other C++ tokens by default. There are a number of other tokens that can be colorized differently to customize the experience.
- IntelliSense Enhancements. The List Members drop-down list appears automatically as you type code into the code editor. Results are filtered using a fuzzy search algorithm, so that only relevant members are displayed as you type. C++ IntelliSense Quick Info tooltips now show richer XML documentation comments style information. Selecting a symbol now highlights all instances of the symbol in the current file. Press Ctrl+Shift+Up Arrow or Ctrl+Shift+Down Arrow to move among the highlighted references.
- C++/CLI IntelliSense. C++/CLI now has full IntelliSense support. IntelliSense features such as Quick Info, Parameter Help, List Members, and Auto Completion now work for C++/CLI. In addition, the other IntelliSense and IDE enhancements listed in this document also work for C++/CLI.
- Visual Studio Templates support. You can now use the Visual Studio Templates technology to author C++ project and item templates
Application Lifecycle Management Tools (ALM)
Code Analysis
Static code analysis helps identify runtime issues at compile time when they are much cheaper to fix. Code analysis for C++ feature in Visual Studio 2012 has been enhanced aiming to provide improved user experiences as well as analysis capabilities. In this new version, code analysis has been extended to support 64 bit apps, ship with additional concurrency rules to detect issues like race conditions, and offer the ability for creating customized rule sets. This feature is now available in all Visual Studio editions allowing every developer to make the best use of it.
Architecture Dependency Graphs
Generate dependency graphs from source code to better understand the architecture of your existing apps or code written by others. In Visual Studio 2012 you can generate dependency graphs by binaries, classes, namespaces, and include files for C++ apps. Also, use Architecture Explorer tool window to explore the assets and structure of your solution by looking at solution view or class view.
Example: Dependency Graph by Binary
Example: Dependency Graph by Include Files
Use Architecture Explorer to browse assets in the solution
Unit Test Framework for C++
Visual Studio 2012 ships with a new unit test framework for native C++. You can write light-weight unit tests for your C++ applications to quickly verify application behaviors. Use the new Test Explorer tool window to discover and manage your tests along with test results. This feature is now available in all Visual Studio editions.
Code Coverage
Code coverage has been updated to dynamically instrument binaries at runtime. This lowers the configuration overhead, provides better performance and enables a smoother user experience. Code coverage feature has also been integrated well with the new C++ unit test framework in Visual Studio 2012 allowing you to collect code-coverage data from unit tests for C++ app by one single click within Visual Studio IDE.
Coming Soon!
We’ve announced two things that will arrive in a few months:
- An update that will enable targeting Windows XP
- Availability of an Express SKU for Windows Desktop that includes C++ toolset
C++ for Windows Phone 8
As soon as the Windows Phone 8 SDK is made available, C++ developers will be able to target Windows Phone. Stay Tuned!
Example: Windows 8 Marble Maze Sample targeting Windows Phone 8
As always, we love hearing from you. Thanks for keeping us honest and kudos to those who have influenced our product design for the better!
On behalf of the VC++ team,
Rahul V.Patil
Lead Program Manager, C++









Thanks to all involved for all the native code love in Visual Studio 2012. Looking forward to Microsoft's further adventures in native code… Some kick ***, on the metal, C++ libraries would be good now.
Awesome :)
So, any indication when VS 2012 will hit Dreamspark?
Tom,
Thanks! I take it you've read Herb's post on libraries: herbsutter.com/…/facebook-folly-oss-c-libraries
Do you have any favorite domains of libraries that you'd love to see?
Dudester,
Check out Neil Carter's response on Soma's blog post today. blogs.msdn.com/…/visual-studio-2012-and-net-4-5-now-available.aspx
If you have further questions on that, feel free to leave a note on Soma's blog.
—-copy-paste—–
Hello –
Thank you for reaching out to us regarding DreamSpark's availability of Visual Studio 2012. This is an incredibly exciting release for us.
If you are a student and your school or institution has a DreamSpark Subscription, the Program Administrator for your DreamSpark Subscription will have access to Visual Studio 2012 today through MSDN Subscriber Downloads (msdn.microsoft.com/…/downloads).
For students with accounts on DreamSpark.com, or with student accounts in their school or institution's ELMS WebStore we are working as quickly as possible to make this available and have a release target of August 24th.
Thank you!
Neil Carter
DreamSpark Global Program Manager
Any hint of when the full c++11 support (variadic templates, initializer lists, etc) update will be released?
Sorry John – nothing that we can share yet.
Hi Rahul,
Well on the native libraries front (and take it as read that all of these should play nicely with STL, i.e. use std::basic_string and support contains and algorithms): XML parsing, file-system, web-stack (get Casablanca into supported mode), compression would be a good start.
Viz updates, Variadics and List Initialisation would be nice, but and I know you're sick of hearing this… Windows XP binary generation (i.e. the option to target either the Win7 or Win8 SDK) without having to bring the hammer of side-by-side installing VS2010. We have far too many clients in Financial Services who are going to stick with XP until the bitter end. Desperately need to be able to use out-of-the-box VS2012 to target Windows XP and create mixed-mode apps that combine C++ 11, C++/CLI and .NET 4.
Kind regards,
Tom
I'm really happy to be getting back onto RTM tools, despite how relatively stable the RC was. Anything particularly notable changed since the RC? I expect it's a pretty hard feature-freeze at that point.
Hi, Are there any improvements for Microsoft Foundation Classes in Visual Studio 2012?
Thanks for the details on libraries Tom.
Re: Windows XP. We hear you:). The plan still is targeting a late-Fall release as per the previous post: blogs.msdn.com/…/10320645.aspx
Hi Simon,
Almost all of the work post-RC was related to fit-and-finish, reliability and performance work – and mostly those reported by developers.
Hi Unique,
Re: MFC:
We've fixed a large number of connect issues/suggestions around MFC. See blogs.msdn.com/…/10320171.aspx However, no large chunk feature items this release.
Congratulations! I also want to say that I'm quite impressed at how MS listened to the community regarding XP support and native C++ in the Express SKU.
I think the decisions to support these things maybe came a bit late, but I really thought that XP support was a dead duck, so I'm especially impressed with that turn around. Kudos.
Thanks MikeB!
Simon Buchan: My last major change was to make <atomic>'s implementation header-only between RC and RTM, for increased performance.
Congratulations on the new release. Obviously there's been a ton of work involved, and it's greatly appreciated by many.
My company can't engage with Visual Studio 2012 until XP support is available (later this fall), but we're certainly looking forward to the enhancements.
I also commend you for listening to us and committing to XP-targeted binaries in the near future. Looking forward to being able to use VS 2012 for real work at that time!
Waiting for XP-targeted binaries. Also – I'll only migrate to VS2012 depending on how cleanly XP targeting is intergrated into VS2012. (If my product requires two installers, or one installer with two sets of runtimes, that'd likley be a deal breaker for me – I'll wait for VS2015, or move to a different platform).
will Remote Debugging work for XP and Vista after the XP-targeting update?
Please hurry up with full C++ 11 compliance
Add one more vote for remote debugging for XP and Vista. It's pretty much a must, rather than a wish.
http://supportxp.com
I am pleased to see that Visual C++ is now fully covered in the Visual Studio landscape. I was talking with Tarek M. and I suggested him to write about cool features of Visual C++. C++ is the electricity for Microsoft. We should never forget this. This is a major release that was shipped with VS2012. Good job.
@Christophe Pichaud I'm not really sure what are you referring to when you mention "[…]Visual C++ is now fully covered[…]" but C++11 conformance in Very Slow (Visual Studio) is by far the worst from all major players. Just look at gcc, clang and then you see what full coverage means. Apart from that, it seems like long forgotten player comes onto C++11 arena: edn.embarcadero.com/…/42275
We also can't upgrade until support for XP targetting is released. In the meantime I've been playing with the RTM. I was disappointed to find that we still can't get code metrics for c++ apps? I tried "ANALYZE | Calculate Code Metrics for project". It thought for a while and eventually output that same old error about there being "no managed code".
Intellisense in VC 11 is not working at all. VC 10 Intellisense is working for the same solution. I didn't convert the projects to VC 11 format. The solution consists of 77 projects. I did reset all settings in VC 11 but no luck. Recreate database and rescan solution didn't fix the problem either. I'm using Windows 7 64 ultimate.
It seems that minimal platform version for LINK.EXE is now 5.1 and not 6.0 as in VS11 Beta, so now we just need an XP-compatible runtime..
Azarien/Ted
As documented in the Visual Studio 2012 compatibility page, remote debugging will not work on Windows XP (or Vista). Sorry, there is no plan to add it back at this time.
http://www.microsoft.com/…/compatibility
Dan S,
That's correct. Code Metrics is not supported for C++ at this time.
Visual Studio 2012 has a nice UI much better then vs2011
@Rahul V. Patil, I don't want to sound negative, but I know I will. The main problem I see with this release of Visual Studio is that despite the hype and talk you guys tried to create around C++, you did virtually nothing for this language – please just don't metion "for based" loops or SCARY iterators which nota bene the latter weren't even required by standard. So what was the logic behind of implementing something which isn't required and not implementing something instead which is required and I believe most if not every dev would prefer? Just like someone said about herb sutter – he just talks but that's all. And here we have the best example of it. It supposed to be C++ Renaissance but instead we have yet another, hell only knows what for, realease of broken Visual Studio. And if that's true what R.J. says about intellisense – guys, it's pure disaster. You already lost METRO to german company, If the trend continues you will lost IDE to someone else.
R J,
I just tried this on a couple of trivial projects. a) create a project in VS 2010. b) open in VS 2012 c) dont update. On Win 7 x64 ultimate. Intellisense seems to be working fine.
If you are seeing this issue on the RTM release build, please file a bug on the connect site: connect.microsoft.com/VisualStudio . Be sure to include the version numbers ("Help – about"), and as much information as possible.
Rahul V. Patil,
Yes, I see this issue on RTM release build. I also have no problem with trivial projects. Our solution is rather complicated and we are using lots of property pages. I think VC11 Intellisense fail in certain configurations like our solution and I hope that I can reproduce it in a sample solution.
I'm going to file a bug on connect asap. By the way we are really disappointed because we waited more than a year to get rid of that slow editor of VC10 + VAX and now here we are facing a new problem.
Reza,
That experience is disappointing indeed.
Thanks for filing the bug. We'll triage ASAP.
Auto-Completing IntelliSence in c++ sweet just need c++ express for 7 or below.
When will you guys add more support for C++11 standard? gcc knocks the pesky out of VC++ when it comes to supporting standards