VC++11 Beta Available, Supported For Production Code

Earlier this month, I announced in my GoingNative talk C++11, VC++11 and Beyond that Visual C++ 11 Beta would be available in February.

Today’s the day: You can download Visual Studio 11 Beta here.

Interestingly, VC++11 is being distributed under a go-live license, which means that Microsoft supports using this compiler to write production code. That’s unusual for a first beta, and it means you can start using its features – notably parallelism and C++11 library and language conformance improvements like range-based for loops – in your production code right away.

We had already announced that VC++11 includes quite a bit of stuff, and here’s what’s new in the beta. Some highlights of the whole product:

  • Complete ISO C++11 standard library. As announced in September, we’ve added full support for essentially the entire C++11 standard library, which I think is a first for the industry to ship in-the-box with a C++ compiler product. We already shipped most of the C++11 stdlib in VC++ 2010, and now we’re including threads, mutexes, condition variables, atomics, futures, and async – and not just as checkmark features, but with async and futures built on top of our ConcRT runtime that also powers the Parallel Patterns Library. Oh, and we’re also shipping an implementation of the draft-standard header <filesystem> based on Boost.filesystem for portable access to directories and files. (The ISO C++ committee has just resumed work on filesystem for near-term standardization; more about this soon in my ISO C++ trip report, which I plan to post within a few days.)
  • Several more ISO C++11 language features. As mentioned in September, we’ve added support for C++11 stateless lambdas and scoped enumerations. On top of that, we were happy to announce this month that we’re also adding the range-based for loop, override, and final – all of which are available in today’s release, and supported for production code.
  • Parallelism galore. As we announced in June, it includes C++ AMP for parallel programming on CPUs and GPUs (with a view to more in the future, including cloud). This month we were also able to add that if the end user’s machine doesn’t have a compute-class GPU and is running Windows 8, we also provide an automatic fallback to multicore + vector SSE instructions, which for now is a fallback but we will continue to improve, so it’s already not just about GPUs. We’ve also expanded the Parallel Patterns Library (PPL) to support Standard C++11 concurrency features, provide more STL-style concurrent containers (e.g., concurrent_unordered_map), more parallel STL-style algorithms (e.g., parallel_sort), and a block-free continuation library for async operations (think “future.then()”, but for now we named it “task.then()” in case ISO C++ wants to surface something like this differently). Almost lost in all the news was another cool nugget: We’re also shipping an automatic vectorizing and parallelizing compiler that takes loops (with optional hints) and automatically generates both multi-core parallel and SSE-style vector code for you.
  • imageWindows 8 support, including Metro-style tablet apps on x86 and ARM. A major engineering change like Windows 8 comes along about once a decade, so with C++/CX and WRL we did a huge amount of work to ensure that VC++ gets great compiler and tool support for writing Windows 8 apps, while writing the minimum quantity of non-ISO standard code on the boundaries with the Windows environment (usually just ^ and ref new, similar to C++/CLI; the vast majority of your code should remain portable C++). And we wanted to make sure that VC++ is a first-class language that is visibly clean, safe, and fast – just as clean and safe in side-by-side code examples with Javascript and .NET CLR (e.g., you can write a XAML UI equally easily on top of any of these language projections), and with C++’s traditional power and performance (e.g., VC++ also supports creating tablet DirectX games and other graphics-intensive apps). Oh, and we brought up a whole new processor architecture: ARM.

As I also mentioned in this month’s talk, once VC++11 ships, we’re switching to a faster out-of-band release cadence so that we can deliver features more quickly than waiting for Visual Studio release schedules – especially to continue to roll out C++11 language features in batches, on a path to full conformance as soon as possible. The first thing you’ll see is a Community Tech Preview (CTP) that we intend to ship soon after VC++11 ships, which we expect to take the form of a new command-line compiler (initially not IDE integration and Intellisense) that you an drop into VC++11 to quickly start taking advantage of still more of the new C++11 language features, with a full out-of-band release to follow after that with still more.

If you haven’t already, please take this quick C++11 feature survey where you can vote on what C++11 features are most urgent for you in VC++. We’re going to implement all C++11 features, but we have to do them in some order – we’re users too and talk to customers regularly, so we think we know what’s most urgent, but we want to sanity-check that with you and make sure we’re doing them in the right order to deliver the most benefit to the most people as soon as possible.

Enjoy!

Going Native Sessions Online

Thanks to everyone who came to Redmond and/or watched online to participate in Going Native 2012, last week’s global C++-fest. It was a lot of fun, and generated a lot of useful and important talks that we hope will help continue disseminate understanding of C++11 throughout the global C++ community.

All the videos are now available online for on-demand viewing. Here’s a handy list of talks for your convenience. Please enjoy – and share!

 

Day 1

Bjarne Stroustrup: C++11 Style [Keynote]

Hans Boehm: Threads and Shared Variables in C++11

Stephan T. Lavavej: STL11 – Magic && Secrets

Andrei Alexandrescu: Variadic Templates are Funadic

Panel: The Importance of Being Native (Bjarne, Andrei, Herb, Hans)

Day 2

Herb Sutter: C++11, VC++11 and Beyond [Keynote]

Chandler Carruth: Clang – Defending C++ from Murphy’s Million Monkeys

Andrei Alexandrescu: Static If I Had a Hammer

Bjarne Stroustrup and Andrew Sutton: A Concept Design for C++

Panel: Ask Us Anything! (all speakers)

GoingNative 2012: Day 2 Tomorrow (Friday)

GoingNative 2012 Day 1 is just concluding, and we’re getting ready for Day 2 tomorrow with more C++11 information and panels.

Day 2 kicks off tomorrow at 9:30am U.S. Pacific time, with the theme “C++11 Today and Tomorrow.” Day 1’s focus was entirely about C++11 as it exists today; Day 2 is partly about C++11 right now, and partly about forward-looking material about where compilers and the standard itself are heading.

In the morning:

  • First I’ll give a talk on C++11, VC++ and Beyond. After a couple of Microsoft-specific announcements at the beginning, the bulk of the talk is about C++11 today – what the key features are that will change C++ coding style, idiom, and guidance the most; tips on how to use those particular features well and the common initial mistakes we’re seeing people make as we’re all learning this together as an industry; how C++11 adoption is progressing throughout the industry from libraries to compilers to books; and finally some concluding thoughts about future directions of ISO C++, starting with the next standards meeting which begins in just three days.
  • Then we’re excited to have Google’s Chandler Carruth with us to talk about the Clang compiler, a “reimagining” (sorry) of gcc that we think is one of the most exciting investments in the C++ world today and something people will want to know about. (Note: No hidden meaning here; the VC++ compiler team isn’t planning to switch to Clang or anything, we’re just really excited to see this as yet another part of the investment pouring into C++ across the industry and want to help people know more about it.)

In the afternoon, we switch to forward-looking topics, and the two talks are about proposals that will begin to be considered at next week’s ISO C++ meeting:

  • Andrei Alexandrescu has agreed to deliver a brand new talk on “static if” for C++. I personally invited Andrei and Walter Bright to propose this feature for ISO C++ based on his experience with it in D, and Walter and I will be presenting the proposal next week at the Kona ISO C++ meeting.
  • Bjarne Stroustrup and Andrew Sutton cover the latest in the still-active C++ concepts effort as the final talk of the event. We decided to request that particular talk because, even though concepts are not ready to come into ISO C++ again in the short term, they are still very interesting and people constantly ask about them, so we wanted to cover that important topic.
  • Finally, we’ll cap the event with an extended 90-minute Q&A panel with all the speakers. Again, you can tweet questions to #ch9live or #GoingNative during any of the talks and we’ll cover as many of them as possible at the end of the talk, but especially be ready to tweet your questions during the panel which is entirely reserved for extended Q&A. This is your chance to pick the brains of a Who’s Who of modern C++, and it’ll be the fourth time in this event that Bjarne will be on stage – he is graciously expending himself for our benefit this week, so take advantage of his availability, and that of the other speakers!

I hope you enjoy it. Repeating the graphics and links for convenience:

image

image

image

image

image

GoingNative 2012: Minus 1 Day

GoingNative 2012 is a global live C++11-fest with unlimited free worldwide attendance – both live and on demand.

The goal is to make it interactive, and we’ve asked the speakers to reserve time at the ends of their talks for questions. Tweet questions to #ch9live or #GoingNative and we’ll try and get them asked. To quote the organizers, “We take this live thing seriously!”

GN kicks off tomorrow at 9:30am U.S. Pacific time with Bjarne Stroustrup’s keynote on C++11 Style.

 

image

 

Here are the other talks on Day 1:

image

image

image

image

 

C++11-fest minus 23 hours…