Trip Report: Fall ISO C++ Meeting

I just posted my ISO C++ meeting trip report over on covering our meeting in Urbana-Champaign earlier this month.

The ISO C++ committee is shipping more work sooner via concurrent Technical Specifications, but it’s still fairly new to find ourselves doing so much work that the “new normal” is to issue an international ballot from every ISO C++ meeting. This time, we have four ballots coming out of this meeting — the first (of two) ballots for the Transactional Memory TS, the final ballots for the Library Fundamentals TS and the Parallelism TS, and a new work item for C++17 since this was the first meeting of the C++17 era.

Oh, and we had evening sessions. Did I mention evening sessions? Five nights’ worth.

Now, two weeks later, I’m almost caught up on sleep.


But what a blast. I’m looking forward to the next few smaller meetings over the winter, and the next full one in May.

VS, Clang, cross-platform, and a short video

Today my team was part of the Visual Studio 2015 Preview announcement, and it’s nice to be able to share that Visual Studio is now going to support targeting Android and soon iOS, using the Clang compiler, from right inside VS. This is in addition to continued conformance and other improvements in our own VC++ compiler for targeting Microsoft platforms.

I recorded an 8-minute video about Visual C++’s conformance improvements in our existing compiler that you can get now in the Preview available today, and why using a single source code base in C++ built using VC++ to target Windows/WP and also Clang/LLVM to target Android and iOS is a hot ticket right now. The Resources slide at the end includes links to two CppCon videos I hope you’ll check out if you haven’t already.

I hope you enjoy the news, and the Preview.

My CppCon talks

Also, my CppCon talks are all up on the CppCon YouTube channel. You can find them here:

I hope you find them useful.

Next stop: Stuttgart

CppCon was a blast. I can’t wait till next year.

But there’s something coming up sooner than that: In two weeks, Scott and Andrei and I will be holding the C++ and Beyond 2014 “Road Show” in Stuttgart, Germany.

The key to this event is not new material, but a new location. Whereas all other C&B’s have been in North America, this is the first time ever that Scott and Andrei and I are doing an event together in Europe. That’s exciting! (At least for us.) If you’ve been to C&B you will have seen most of this material before, but if you haven’t been able to get to C&B until now you may find it convenient to have the event be more local to European attendees. The talks are all talks we’ve given at C&B before, but there will be updates.

Scott seems to be looking forward to a debate with me about parameter passing. I’m glad he thinks I’m “seeing more reason than [I] used to, (i.e., having moved closer to [Scott’s] point of view)” – by which he means that he has moved closer to my point of view. :) Should be fun! The boring truth, as I presented at CppCon on Friday, is that everyone agrees that the default parameter passing rules are the same as C++98… <gd&r> and let the games begin!

Trip Report: CppCon 2014

I just posted my CppCon trip report over at

I’ll repeat just the last part here:

Huge thanks again to the 150+ speakers, planners, and volunteers without whom this wonderful “C++ festival” (as several people spontaneously called it) would not have been possible. I had guardedly high hopes for the event, but I think it exceeded all our expectations. This was the most exciting and enlightening week I’ve experienced in my 20 years of C++, and I’m still catching my breath. I can’t wait until September 2015.

Here are a few pics I and others took. You’ll find more on Twitter tagged #cppcon.

Mark Maimone of NASA and Mars Rover fame.

Bjarne taking questions after his talk.

“We’re sold out of A Tour of C++ again… how about this instead?” [photo credit: Artur Laksberg]

[photo credit: Artur Laksberg]

[photo credit: Artur Laksberg]

Walter Brown speaking in one of the six concurrent breakout sessions.

Jon Kalb speaking in one of the other rooms.

Possibly the youngest attendee? [photo credit: Artur Laksberg]

Accessibility and community.

Yup. Modern C++.

View from the CppCon balcony before diving into more evening sessions.

So long, Meydenbauer Center… see you next year! [photo credit: Hyrum Wright]

My CppCon Plenary (updated)

When we announced the CppCon conference program and I posted my final talk selection, the original plan for my Friday ‘endnote’ plenary was for it to focus on giving an update on future standardization plans. However, quite a few people immediately wrote me to express disappointment that I wouldn’t cover my Modern C++ Style material, which they felt was sorely needed as we build updated C++ usage guidance in the presence of everything that’s new in C++11 and C++14 which really do make C++ feel like a new and fresh language. At the same time, I noticed that the standardization material I had planned to cover will be covered very well in the Monday CppCon talk “What the Committee Did Next!” by Alisdair Meredith, chair of the Library Working Group of the C++ standards committee.

So I suggested that maybe we ought to repurpose my Friday plenary session with the other highly-requested topic instead, and the organizers agreed. Here’s the new description:

Back to the Basics! Elements of Modern C++ Style

by Herb Sutter

This talk revisits basic questions, such as how to declare and initialize a variable, how to pass a value to a function, how to write a simple loop, and how to use smart pointers, in the light of experience with C++11 and the latest C++14 refinements. This involves examining auto, rvalue references, range-for loops, uniform initialization, lambda expressions, unique_ptr and shared_ptr, and more.

Like all CppCon sessions, this talk will be recorded and is expected to be available online a month or two after the conference.

Note: If you’re in the Seattle area, note that Friday admission is free and open to all, as are evening and breakfast sessions, even if you don’t have a registration to see the other 100+ daytime technical sessions. (Though if you’re in the Seattle area and a C++ developer, why wouldn’t you register for the whole conference? Airfare and hotel are the majority of the total cost for most attendees, so if you’re local anyway this is some of the most inexpensive high-quality training there is. Just sayin’. Note that I am one of the CppCon organizers but I have no personal financial stake in CppCon – I’m not getting a penny from it – I’m just a delighted participant and attendee.)

I’m looking forward to seeing many of you at CppCon!

My CppCon talks

A few weeks ago, here and here, I posted the five talks I submitted for CppCon.

Good news (really): The CppCon program (posted today) is so strong that some of my talks legitimately fell below the cut line. Instead of giving five talks, I’ll be giving two – one as I proposed it, one a plenary session condensed from three proposed talks. The fifth proposed talk fell under “thanks but there’s just no room, maybe next year.”

This is an awesome problem to have. Seeing the other sessions I am sincerely happy to see some of my material and proposed topics have to be condensed and/or cut to make room for the high-quality content in the program from other speakers. Little did we know what a strong response there would be to the call for session proposals, with well over 100 speakers proposing talks, but the response was just, well, awesome. Now that the Program Committee has done its work (thanks again, PC members!), here’s how it came down for me:

First, I’m doing a plenary session in the main hall which will be 90 minutes instead of 60 and so will let me combine and condense material from my proposed talks on Standardization Update, Garbage Collection, and C++ ABI, to make a single forward-looking ‘endnote-y’ session. Here’s the merged title and abstract:

C++ Today and Tomorrow: C++14, a Gaggle of TSes, and Beyond

This talk starts with a standardization update: By the time we meet at CppCon, C++14 might already be ratified. But that’s only one of eight (so far) work items now in flight. This session will start off with a summary of the new features coming in C++14 itself, followed by a tour of the seven (7) near-term separate Technical Specifications already underway – think of these as the “C++14 wave” of deliverables, covering standard support for everything from file system access and networking, to concurrency and parallelism, to concepts and transactional memory. In each case, we’ll get a feel for what each major feature looks like and how to use it, and why it’s important for the standard and for your own portable C++ code.

Then we turn to future directions: What two features are expected to be pillars of C++17? What other work is being done, and what other problems need to be addressed, and how, for C++ to continue to fulfill its mission to be a modern close-to-the-metal systems programming language? Sutter will share thoughts on two specific forward-looking topics: First, how garbage collection can be added well to C++, directly complementing (not competing with) C++’s existing strengths and demonstrating why, as Stroustrup says, “C++ is the best language for garbage collection.” And second, why and how we might develop a standard C++ ABI, including directly addressing the #1 valid reason to use C instead of C++, and removing a major obstacle to sharing binary C++ libraries in a modern way.

Second, I’m doing the lock-free programming talk as a regular talk:

Lock-Free Programming (or, Juggling Razor Blades)

Example-driven talk on how to design and write lock-free algorithms and data structures using C++ atomic – something that can look deceptively simple, but contains very deep topics. (Important note: This is not the same as my “atomic Weapons” talk; that talk was about the “what they are and why” of the C++ memory model and atomics, and did not cover how to actually use atomics to implement highly concurrent algorithms and data structures.)

The talk that didn’t make the bar this time was Modern C++ Style: Idioms of C++11/14. It’s a shame, because I think it’s a strong talk, but some of its material will be covered well in talks by other speakers, and the 1-3 hours this talk would have occupied will be put to even better use by up to three other talks on other modern topics.

I’m really looking forward to being in the audience for the talks that take the place of this one, even as I look forward to re-proposing this talk for next year’s CppCon.

I hope to see many of you at CppCon.

CppCon: My Proposed Talks (Part 2)

Yesterday I posted three of my proposed talks for CppCon. These are the ones I’ve given publicly before, but they’re not retreads – all are fresh and up to date, with refreshed or new material.

But I’ve also proposed two brand new talks – titles and abstracts are below.

Note: The CppCon program committee will be considering the talk proposals to come up with a balanced program, so it’s possible that not all of these will be in the final program, but I have high hopes for most of these…

CppCon is building well. I don’t know how many talks there will be in the end as this depends on the program committee including in part how long the accepted talks are, but FWIW my talks are submissions #41 and #126-129. There’s some really great stuff in the pipeline on all sorts of topics of interest to C++ developers, not just about the language itself but also tools, specific domains, and lots of cool stuff that will be shown for the first time at CppCon.

I look forward to seeing many of you at CppCon this fall! If we have the right equipment in the main auditorium, there might even be a wind of change…


GC for C++, and C++ for GC: “Right” and “Wrong” Ways to Add Garbage Collection to C++ (1 to 2 hours)

“Garbage collection is essential to modern programming!” “Garbage collection is silly, who needs it!”

As is usual with extremes, both of these statements are wrong. Garbage collection (GC) is not needed for most C++ programs; we’re very happy with determinism and smart pointers, and GC is absolutely penalizing when overused, especially as a default (or, shudder, only) memory allocator. However, the truth is that GC is also important to certain high-performance and highly-concurrent data structures, because it helps solve advanced lock-free problems like the ABA problem better than workarounds like hazard pointers.

This talk presents thoughts about how GC can be added well to C++, directly complementing (not competing with) C++’s existing strengths and demonstrating why, as Stroustrup says, “C++ is the best language for garbage collection.”


Addressing C++’s #1 Problem: Defining a C++ ABI (1 hour)

“Why can’t I share C++ libraries even between my own internal teams without using the identical compiler and switch settings?” “Why are operating system APIs written in unsafe C, instead of C++?” “Why can’t I use std::string in a public shared library interface; it’s the C++ string, isn’t it?!”

These and more perennial questions are caused by the same underlying problem: For various historical reasons, C++ does not have a standard binary interface, or ABI. Partial solutions exist, from the Itanium ABI which addresses only the language and only on some platforms, to COM and CORBA which do both less and far more than is needed.

It is deeply ironic that there actually is a way to write an API in C++ so that it has a de facto stable binary ABI on every platform: extern “C”.

This session describes current work driven by the presenter to develop a standard C++ ABI. This does not mean having identical binaries on all platforms. It does mean tackling all of the above problems, including directly addressing the #1 valid reason to use C instead of C++, and removing a major obstacle to sharing binary C++ libraries in a modern way.