Oh, lock-free circular buffers, yay! Hey, no 2D graphics? Jacksonville trip report

[ Note: If the jargon is confusing, check out the committee page at the ISO C++ site. Failing that, put requests for clarification in the comments and I’ll amend this post – end note ]

This was not the trip I was expecting.

Plans set in motion

I landed on the evening of Saturday March 10th and checked in to room 1234 (I was making password jokes all week), then spent Sunday combating jet lag, aided somewhat by the start of daylight-saving. I made my plans: I had two papers to present, P0059, concerning circular buffers, and P0267, concerning 2D graphics. The circular buffers paper formed part of the Tuesday evening session on new STL containers, and the 2D graphics paper formed part of the Wednesday afternoon session in LEWG. I decided to spend a day or so in LWG to hear some rhetoric about wording and learn more about the art of good writing for the standard, after which I would spend some time taking the temperature in LEWG before presenting P0267.

Right now, both library groups are processing fewer papers than they receive. There are 19 sessions of about two hours during each meeting, and LWG spent the first five sessions on P0214, Data-Parallel Vector Types & Operations (for the Parallelism TS), which defines some SIMD types. I was delighted to be in on this, and even offered to scribe but found it impossibly hard, unlike my stint in LEWG at Toronto. However, it was during the fourth of these sessions that I started to feel distinctly unwell.

This was Tuesday morning. The evening session was devoted to SG14 containers, which was my opportunity to relaunch my circular buffer paper. I struggled through and was given strong encouragement from the SG1 chair to re-present in Rapperswil in July. SG1 has yet to ship a concurrent container; indeed, there is no such thing in the standard yet. I approached the LEWG chair, Titus, after the evening session and remarked on my poor health; he graciously rescheduled me to Friday afternoon.

What on earth is happening to me?

I spent the next two days in my room, my mind an addled haze of incomplete trains of thought. I felt somewhat improved by Wednesday evening and attempted to join the Unicode evening session: however, Titus sensibly enquired if I was all better and suggested I return to my room if not and avoid infecting others. It was a hard position to argue against. As in Toronto, I attended through Standard C++ Foundation sponsorship and I felt somewhat embarrassed about sitting in my room and failing to contribute. Additionally I needed some stimulus, and I strongly had to resist misquoting Ming the Merciless from the opening of the Dino De Laurentiis remake of Flash Gordon: “Titus, I’m bored: what plaything do you have for me today?” However, sickness is not a kind thing to spread around a community with such a broad age range. One or two of the committee members, while still sharp as nails, are perhaps a little less robust in their years. I returned to my room, my room service and my dissolute meanderings.

Disaster struck when my travel kettle broke. A sick Englishman with no ready access to boiling water for tea is well known to create a mighty psychic depression the size of Buckinghamshire, reaching in to the dreams of those caught in its embrace and tainting them with despair. The room’s coffee facilities could not raise any sensible volume of water above about 85 degrees centigrade, and I was doomed to ingest many cups of insipid yet expensive tea: I bought 40 bags of Harrods Earl Grey No. 42 at Heathrow.

By Friday it was clear I was not going to be able to deliver my ‘A’ game. As the BSI caucus met for lunch in the bar I was still feeling pretty ropey. We got through business and I prepared for my session.

2D or not 2D? That is the question

My aim was to move the paper to LWG to publish a working draft, to prevent further miring and tweaking in LEWG and to give people something solid to write proposals against. I surmised this would free up LEWG time (each presentation of the paper consumes an entire precious session) and draw still more people to the project. An OS X backend was independently developed after my presentation at Meeting C++ just from the paper and the reference implementation, which I took as grounds to indicate that the paper’s development was sufficiently advanced. In addition, there were five years of strong encouragement from LEWG to pursue this course of action. I should of course point out that my co-author Mike McLaughlin completed the lion’s share of this work: I joined the project in late 2016, and it is he who generated this consensus.

However, it’s all down to who is in the room on the day. Everyone in the room gets a vote, and only they get a vote. As the session unfurled it became clear that the room wanted to address the very existence of the paper, rather than its quality or suitability for advance. Ultimately there was no consensus for any action and no advice on how to proceed beyond separating out some of the smaller parts like linear algebra and geometry. The minutes make slightly gruesome reading.

At first sight this treatment might seem unfair. What if it’s your first time at LEWG and you’re not familiar with the history of a proposal? What if you’re ideologically opposed to it even though the paper has been encouraged? You still get a vote? Yes, yes you do. If a proposal is popular and worthwhile then committee members will turn up to help defend it, and improve the numbers during the vote.

Hang on a minute

I left the session early and was joined by Michael Garland from Nvidia to discuss possible future directions and approaches. Perhaps I could offer it to Boost? Maybe we could send command strings to a canvas, browser style? As the session ended and I went in search of tea, I was greeted with commiseration and sympathy from all, detractors and supporters alike.

Suddenly, Roger Orr, who is the head of my National Body the BSI, appeared from nowhere along with Herb Sutter announcing their intent to go to LEWG and seek clarification on what had just been voted for. Herb reminded the group that strong consensus is required to change the status quo but also acknowledged that the process is stuck, and that there should be an evening session in Rapperswil on 2D graphics. Attendance may prove strength of interest and further input may put the process back on the right track.

Meanwhile I’m going to re-examine the component parts of the proposal. Linear algebra and geometry may make good standalone proposals. As a maturing English mathematician (apparently one of the most feared species in this part of the galaxy: just ask Isaac Newton or Stephen Hawking) the linear algebra section appeals most to me.

Wrapping up

The evening session was the inaugural meeting of the newest Study Group, SG15, Tooling. This is a topic close to my heart as a lot of what I do in my job at Creative Assembly revolves around tooling. It was a full session and generated a formidable to-do list. As I indicated in my last post, dependency management and an ISO C++ repository are things I would like to see, but there were so many other reasonable and relevant demands.

Saturday morning shuffled into view. I packed and went to closing plenary, and took a seat at the back, feeling really quite peculiar. As the reports went on I struggled to sit upright, and as Titus started to report on LEWG I started to get quite worried. As he mentioned graphics I fainted. Amusingly, my neighbour thought I was silently passing commentary with comic effect so it took a while for him to realise something was most definitely up. Recovering somewhat, I hurled myself out of the adjacent door and again collapsed to the floor and tried to get into the recovery position. Someone dialled 911. After a few moments things became a little clearer and I could see quite a lot of people around me, particularly three of the officers of the Standard C++ Foundation and the chair of INCITS PL22.16, the US National C++ committee. There was concern and care on their faces, and I realised these are people I actually know. Paramedics appeared, took a spot of blood, measured my blood pressure, asked me questions, advised me to come with them, got me to sign a release form and disappeared with paramedic efficiency. I went back to the closing plenary for voting (my neighbour delightedly proxied for me since by now I was sitting on the floor, disinclined to get up), and business was completed at 12:00 precisely. That’s how we do things.

People wanted to be sure I was still OK, and chaperones were arranged for my return trip to London (nobody came from Brighton except me) – thanks Vittorio! Then some of us went for amazing Dim Sum at Timwah – so good I’m going to link to it here. One of our number drove me to the airport and made sure everything was OK. I left Jacksonville at 17:00.

As we were leaving the ground, I reflected on the committee. At heart, we’re a bunch of decent geeks who want to make the world a better place in the best way we can. We solve problems presented to us daily to achieve this, in small but regular increments. It scales well. The sympathy and respect I observed were part of this, and I know that I will be able to look everyone in the eye cheerfully next time we meet. Also, the committee did everything in its power to ensure my well-being and take good care of me. Health has to come first, not 1449 pages of language specification.

I would, just to be absolutely clear here, like to express my heartfelt gratitude for the response of the committee and its officers during my health incident. Organisations and individuals are defined by their conduct when things don’t go according to plan. Everyone showed themselves to be the right people to put your trust in. Particularly, I want to name Herb Sutter, John Spicer, Michael Wong, Chandler Carruth, Adam Martin and the chap who proxied my vote whose name I didn’t even ask for. Contact me in the comments and I’ll put that right. Thanks everyone. It really did feel like “The gang’s all here” when I started paying attention.

So, now what?

Well, I’m glad you asked.

  • Immediately, I have an AI talk to co-present at ACCU with my colleague Duygu Cakmak. It will be her first time there. Do drop in and cheer her on. And me too if you can spare the energy.
  • I’m going to write something for the post-meeting mailing about 2D graphics, my experience with the process and what I think remains to be done. It will be a ruminations paper rather than a proposal of anything concrete.
  • I’m going to disinter the lock-free revision of P0059, the circular buffer paper, and start iterating with SG1.
  • I’m going to work up a linear algebra paper for 2D graphics. I have a coauthor with additional experience in the field and I have several pages of wording to recycle.
  • I’m going to continue maintaining the 2D graphics library implementation. I’m delighted to announce that the OS X implementation is alive and kicking thanks to the efforts of the new contributor mentioned above, Michael G. Kazakov. We’ll take a view after Rapperswil. Speaking of which…
  • I’m going to attend the Rapperswil meeting. This hasn’t put me off the committee or the process at all. So, yeah, I’ll be back.

Batteries not included: what should go in the C++ standard library?

About forty Christmases ago I was absolutely delighted to open a slot car racing set from my parents. I feverishly set everything up, created a track reminiscent of Brands Hatch, and went to plug everything in, only to discover that I needed batteries to operate the controllers. This was Great Britain in the 1970s. There were no shops open on Christmas Day. There were no appropriate batteries in the house, nor in our neighbour’s house. My delight was transformed to desolation. My parents had an argument. My grandfather distracted me with a story about one of his second world war sorties over the French coast. I watched a James Bond film sulkily. All because there were no batteries in the box.

What prompted this blog post?

With the next C++ Standard meeting in Jacksonville bearing down on us, I have just submitted the next version of the 2D graphics paper, https://wg21.link/P0267. One argument levelled against it runs along the following lines:

“A graphics library shouldn’t be part of the standard library. The standard library is too big already, and this will make it so much bigger. It’s just not appropriate. The library should only contain small types.”

Of course, I disagree with this. I think the library is impoverished and needs fleshing out to make C++ a stronger contender in the development arena.

What is already there?

A quick glance at cppreference.com shows the complete set of headers divided up into the following categories:

  • Utilities
  • Strings
  • Containers
  • Algorithms
  • Iterators
  • Numerics
  • Input/output
  • Localisation
  • Regular expressions
  • Atomic operations
  • Thread support
  • Filesystem

Some of these are more useful than others, and some attract more irritation than others. I know some developers who complain about the input/output, saying it’s bloated and inefficient. I know others who bemoan the incompleteness of the thread support. I don’t know anyone who actually uses the regular expressions, nor the localisation, nor std::multimap.

Then again, who doesn’t use std::vector, std::array, std::iterator, std::find_if and so on? There is plenty to choose from, and some parts find greater application than others.

What could go in the standard library?

One argument is that the standard library should be minimal and complete. It should contain types that require compiler support, like the type traits, and things that are strictly platform specific, such as SIMD support, file IO and atomic operations. The rest is just holding the user’s hand. I’m going to call this level 0 for want of a better description.

If you asked a user to write a mutex, I’m pretty sure they would get it wrong several times before they succeeded. Most likely they would not actually get it completely right and would encounter a peculiar edge case that broke everything at an inopportune moment. It suggests another class of content: things that are hard and error prone. This obviously includes thread support and also memory management. I’ll call this level 1.

Then there are the obvious types that it would be silly to do without. These are the types that are frequently reinvented and are the basic staples of many programs. These are the types such as std::complex, std::array, std::function, std::string, numerics and so on. They aren’t necessarily hard to write, but they are extremely broad in application and it is a safe bet that they will be used by nearly every programmer who will be grateful to have them. This is level 2, and standard commentators will start to murmur a little, remarking on how std::string is an unnecessarily large interface that should be made up of non-member functions, and std::function shouldn’t perform allocations.

What’s left on the list? The STL is one of the wonders of the modern age as far as I’m concerned but it doesn’t fit into any of the prior categories. The containers, iterators and algorithms aren’t “obvious” types, and there’s no particular need to have them in the library, but they’re incredibly useful. This is level 3, and here is where standard commentators start to get quite restless. They might remark that these types and functions are really quite large and bulky, they soak up implementer time, and they should have remained in a separate library.

What do other languages have?

Hand on heart, I’ve been full time C++ for twenty years now, with very little exposure to other languages, so I can’t speak from much experience. However, when you look at Java and C#, you find absolutely huge library support “out of the box”.

The Java Class Library consists of, at first glance, support for UI, database connection, networking, sound, image manipulation, XML, CORBA, encryption, even hosting for scripting languages: the list goes on.

If you decide to open Visual Studio and start writing a program using C# you have the Base Class Library (BCL) at your disposal along with the .NET Frameworks (FX) which together include support for networking, reflection, threading, XML, and parallelism amongst others. There is tooling for building GUIs too, and of course there is LINQ.

These languages are made a little differently from C++ though. Java is owned by Oracle, C# is owned by Microsoft, but C++ is owned by no corporate entity. The development of C++ is controlled by a public process which makes it rather slower to grow. Meetings to discuss, and vote on, what should be added and amended must be inclusive and public. However, there is an enormous wealth of support from these languages that would fit in at level 3, and it seems obvious to me that this support contributes to the popularity of those languages.

Having said this, it’s important to note that bigger is not necessarily better. I don’t think it is controversial to remark that these frameworks err on the large side. However, there is a useful core which I contend is larger than the standard library. That useful core drives the success of these languages. There is clearly a “critical mass” that can be achieved, and while those languages have erred on the other side of that mass, C++ has yet to reach it. I would rather we overshot a little and reaped the benefit of greatly increased adoption.

What typical jobs can’t be done “out of the box”?

Consider my opening anecdote of a Christmas in 1970s Great Britain. A more adult version of this is experienced by many learners who try and solve programming tasks using C++. Would you like to open a socket? Nope, can’t do that. Decompress a stream of data? Sorry, no. Open a dialog box? No. How about telling me what pixel my mouse is pointing at? Ummm… no. Flash some LEDs? Play a sound? Turn off the power? No, no and no.

It’s still the 1970s in C++ land.

What do we do instead?

Your toolchain will come with bindings for interfacing with the host operating system, which should solve network, power, sound and UI issues.

There is also a huge ecosystem of libraries. It really is impressive looking at the amount of code out there for people to choose from to solve your problems. Boost contains an Aladdin’s cave of riches. GitHub is overflowing with niche solutions for all manner of problems.

However, this tyranny of choice is paralysing for newcomers to the language. Operating system bindings differ for each OS. A fresh user cannot sit down with one book and any toolchain and learn the language through solving some real world problems: there is other, platform specific stuff to know.

Not only that, but not all code shops will permit the use of third party code beyond a language and its library. There are commercial, industrial and military environments that insist all code is created in a “clean room” environment. The arrival of software patents has made this an even more complicated matter.

Is there another vehicle for larger types?

As I said, I have skin in this game. I think a standard 2D API will be a great benefit to the library and I have one that’s nearly ready to go. I am keen to turn it into a Technical Specification and then see it incorporated into the International Standard.

But is there a destination other than the IS where it might be published?

At the moment, no, there isn’t, but I can envisage a repository of source libraries that have been “blessed” by the committee which exist outside of the standard. At the moment the committee consists of two streams, the library and the language. A third stream could be introduced which reviews candidate libraries for inclusion in this repository, rather than being added as level 3 contributions to the International Standard.

This repository could come with clear rules:

  • All conforming implementations would have to be able to build it entirely.
  • Contributions should not be burdened by licensing restrictions.
  • Updates to the source should be reviewed by the committee.

What I’m talking about is a package index, or better still, a package manager. The former will retrieve libraries, while the latter will manage dependencies and auto-updates. If you’re writing some code in a blog post that uses graphics, you should be able to instruct your readers with something like

To build this code, type "cpp-get lib-graphics 1.56" at the command line.

and it should Just Work. It means we can assume every developer has access to a particular library.

There are already several developers looking at ways to implement a package manager. There are some mature efforts out there. Conan, apt-get  and vcpkg are a godsend: indeed, the 2D graphics paper’s reference implementation relies on vcpkg to install the support libraries. But, and it’s a big but, we don’t have a standardised package manager or index, like Python’s PyPI (over 120,000 packages!), ready to power any C++ implementation with the extra voltage needed to write truly useful programs out of the box.

In summary, perhaps there are two ways to ship libraries that can be assumed to be accessible to all C++ developers:

  • In the box (i.e. in the International Standard)
  • In a package index (To Be Designed)

I hope that at some point in the near future something will emerge blinking into the light of day and we can examine an additional way of growing the standard library.


This post started as a pair of email conversations. One was with Titus Winters, chair of the Library Evolution Working Group. Several portions are lifted with gratitude directly from his words. The other was with Herb Sutter, chairman of the ISO C++ Working Group, and Richard Smith, C++ project editor, to whom the same thanks are directed. Many thanks also to Herb for review commentary and corrections on the organisation of C#. Remaining errors are of course my own.

Trip Report: My first ISO C++ Standards meeting

On July 8th 2017 I landed at YYZ in Toronto, ready for a week with over a hundred C++ experts thrashing out the details of improvements to the standard. This was my first standards meeting and I didn’t really know what to expect: I’ve read many trip reports but they tend to speak of the results more than the process. This post will describe more of the process.

Day 1

After an uncomfortably large breakfast I walked to the meeting venue. The meeting opened with a plenary session. This session described what the order of business would be and described administrative points. The day started at 09:00 but this was exceptional: the remaining days would start at 08:30.

As you might expect, the room was full of people whose names you know but whose faces you haven’t necessarily seen: there was an introductions point during this session where everyone announced their name and role in turn. Additionally, diversity was rather limited: although the age distribution was good (retirees still turn up to offer the benefit of their experience, and there were undergraduates present) it was rather white and male.

Business is done by each group in their own room. There are eighteen groups in total: four working groups and fourteen study groups. The working groups work on the language (these groups are named Core and Evolution) and the library (named Library and Library Evolution). Papers arrive at the evolution groups where they are considered for inclusion in the standard, and then forwarded on to their partner for final checking before inclusion into the standard. Some papers will have an impact on both the language AND the library. Concepts, for example, requires new keywords to be added to the language, and for many library features to be decorated with their concept requirements.

The working groups were active throughout the entire meeting. There were four sessions scheduled each day of between 90 minutes and two hours. Papers were presented, discussed, and accepted or returned to the author for further development.

For the first day I decided to spend my time in the Library Evolution Working Group (LEWG). There were about a dozen of us looking at the ranges, networking and coroutines TSes before forwarding them to the Library Working Group (LWG). We also considered a paper on endian-ness from Howard Hinnant (P0463) and a paper on the “spaceship” operator from Herb Sutter for consistent comparison (P0515). These paper numbers can be appended to https://wg21.link/ to retrieve the latest revision. I’m not going to provide links to the papers: you can make your own links now!

In the evening Titus Winters presented P0684 about how we go about delivering new versions of C++, and we finished at about 21:30. I was remarkably tired, which may have been down to jet lag or the huge amount of challenging thinking I did all day.

Day 2

I planned to spend time in each of the working groups, but I made my way to LEWG again as I had an interest in one of the papers scheduled for the first session. However, Walter Brown entered the room remarking that LWG was seeking a quorum and I decided to help out. Walter is the model of professional courtesy and it was hard to turn down such a politely made request.

The task at hand was checking issues with the Ranges TS. Eric Niebler and Casey Carter were iterating through the GitHub issues which were largely wording related and the rest of LWG was requesting clarification or amendment. There were half a dozen of us; the group is rather less attended than LEWG and the work is a little more particular.

The role of LEWG is to see whether a paper should be considered for inclusion in the standard or not, while the role of LWG is to ensure it’s correctly worded before passing it for publication. LEWG is a more exciting place to be as this is where the new stuff is unveiled, but LWG is necessary and needs staffing. It was very interesting seeing the process unfold, as clauses were decided, phrased and ordered appropriately. The standard is a legal document, and must be unambiguous: a lot of blue-pencil work is required. This satisfied my OCD demon.

Committee time is very valuable and there is little time for digression. We got through nearly all the outstanding priority one and priority two issues: the end was in sight but we had to follow the schedule and stop. Eric asked for volunteers to complete the job at lunchtime the next day and I offered my time. There would be pizza, plus the chance to complete the Ranges TS.

I have two papers in flight at the moment: Adding circular buffers (P0059) and Adding a 2D Graphics API (P0267). The graphics paper was scheduled for the afternoon but the nature of the paper is such that it requires a lot of eyes going through parts of it. Things were hotting up in the Evolution Working Group (EWG) as the Concepts discussion was nearing an end, and numbers were depleted in LEWG, so the graphics paper was postponed to the next day. Instead, more digestible papers were considered.

Howard Hinnant presented his paper on calendars and time zones (P0355). This is a completion of the work started with <chrono> for working with hours, minutes and seconds, introducing classes for time zones, days, months, years and calendars. This is a substantial undertaking to say the least, complicated by bringing in a dependency on an external time zone database maintained by IANA. I still feel a little queasy about this but it’s clearly the only solution unless WG21 decides to adopt time zone management into its charter. That isn’t going to happen, of course.

The evening was taken up by an extra session for the Evolution Working Group (EWG) on Concepts syntax (P0696). There was heated debate about complexity and even discourteous conduct which the chair, Ville Voutilainen, had to bring to order. In all honesty, I was uncertain why positions were held with such passion, but there was resolution and eventually consensus. At the back of my mind was the desire for everyone to kick off C++20 with some TS inclusions.

Day 3

The graphics paper (P0267) was examined. It’s a big beast, weighing in at nearly 150 pages, and had garnered quite a bit of interest. Numbers were strong and the room was divided into three groups to look at two sections each. This was a common trend in LEWG: some papers do not need to be analysed by the entire room, so the group will parallelise the task and consider several papers simultaneously, returning to the entire group to present findings later in the session or at a subsequent session.

The paper is mature: although I am the co-author I only joined the effort a few months ago. Michael McLaughlin has completed the lion’s share of the work. We are seeking adoption of the paper into a TS, or Technical Specification, to get feedback from the wider C++ community. Just as Modules, Concepts, Networking and others have been offered for gathering early opinion from the final users, so we want to offer Graphics. This was not that day though, and further effort needs to be undertaken.

If graphics interests you, you can find the paper and a reference Windows implementation on GitHub. I’ve already (partially) written an Asteroids game using the implementation, and I look forward to the efforts of others. I’m sure there are more games ready to debut within the API. I might try organising a competition with prizes if interest is high enough. Watch this space.

Lunchtime rolled around and I raced to LWG. We had overrun a little in LEWG and I didn’t want to miss the pizza. Fortunately, the ordering had been generous and I settled down to minutiae over pepperoni. Ninety minutes were allocated to lunch each day, and in that time we finished all the Ranges TS issues and heaved a sigh of relief. Come the Saturday plenary, the Ranges TS could be advanced for publication. The remaining task is editorial: all the changes that have been proposed and voted for now have to be verified as present in the TS. This means that someone, or rather several people, need to go through each one line by line and check it’s there. This is called the editorial committee. I volunteered: it’s an excellent way to learn the feature, and I haven’t actually digested the whole TS yet. What better opportunity so to do while also being useful.

During the afternoon session I returned to LEWG to see my other paper being reviewed. It’s good to go, and I’ll be coming up with wording for re-presentation at the next standards meeting. We looked at two other containers also, the flat_map (P0429) and the slot_map (P0661). These associative containers will speed up dictionary lookups enormously. LWG issues a Library Fundamentals TS (version three should be started any time now) and these containers would appear in there once they have passed through LEWG and LWG.

I started noticing people yawning. The standards meeting is not a relaxing holiday: it is hard work to constantly analyse papers critically and consider their impact on the rest of the standard. A whole day’s work is tiring and it’s worth recalling that this is a voluntary effort. Nobody is paid to do this.

In the evening however it was time to relax a little. Waterfront International sponsored a celebration of C++17 and we went up the CN tower to eat and drink at their pleasure. The event started early in the evening while it was still light, and as night drew in the glittering tablecloth of man’s endeavour became apparent on the land all around us, as the street and office lights appeared. Most of the software that enabled this was probably written in C++.

Day 4

I remained in LEWG; Daniel Garcia presented his contracts paper (P0542) which looks like assert on steroids. We were delighted to pass this forward to LWG. Alisdair Meredith had a paper deprecating lots of stuff from the standard (P0619). I take great joy in removing lines of code from the Total War codebase. I took similar joy in evicting no-longer relevant items from the standard.

We also looked at an example distribution of the standard library headers when modules appear: which modules will receive which headers? There was a string formatting paper (P0645) which greatly improves upon printf.

I normally spent my lunch break with a couple of colleagues in the local Belgian pub, The Prenup, which served good food and beer. It felt somewhat British, although the poutine was distinctly local.

In the afternoon we looked at P0244 which was about character encoding, and reviewed the slot_map further. I did some scribing. All the sessions require a note taker whose job is to record discussion, reasoning and proposed action points and the results of straw polls. These straw polls take the form of a question and a choice of five options from Strongly For to Strongly Against. This is how all the decisions are made. Scribing is hard but important. Unfortunately ISO rules forbid recording, so the whole things has to be done by typing as people speak, which is not an easy task, as I discovered.

Notes are kept in the wiki, which is hosted by Edison Design Group. The wiki is the sum total of all considerations of the committee, organised by venue, and then by working group and study group. Each group gets a page and the chairs are able to use their page to post relevant information during the meeting, for example a schedule of papers to be investigated, the day they are likely to be investigated and any polls and outcomes. Each paper gets its own page for notes, discussion and polls. These notes can be used by absent authors to guide future development of their papers.

SG7 met in the evening to cover reflection papers. The Study Groups specialise in particular domains such as concurrency, modules, networking and concepts to name just four. Domain specialists populate these groups, generate papers and forward them to the appropriate working group. Papers will typically go to the evolution groups.

The study groups met for one or two sessions throughout the week, although SG1, the concurrency group, met for every session. There is a lot of work to be done. There were additional evening sessions for extra work. There was always something to help with in the evening. SG7 discussed static reflection of functions (P0670) and metaprogramming by design, not by accident (P0425). There was also a presentation from Herb Sutter on metaclasses (P0707). If you were at ACCU earlier this year you would have seen his keynote and you will recall the palpable excitement; I will remark that it was as well received in Toronto as it was in Bristol.

Day 5

Having spent time in LEWG, LWG and EWG, it was time for me to visit Core (CWG). We were working through the Modules TS (D0702), ensuring wording was correct. After the discussion in the other groups, the silence was deafening, broken only by the thrum of the air conditioning. I actually whispered to my neighbour.

The Modules TS is 16 pages long, and there’s plenty of whitespace, but it still took several sessions to clear. There were 18 people in the room carefully examining all the text for impact on the standard and for inconsistent phrasing that could introduce ambiguity. The pdf was modified on the fly by the author, Gabriel Dos Reis, sitting in the corner of the room composing while we verified, and we hit reload on our laptops as each correction was submitted. Additionally, the wiki was heavily edited and refreshed by Jens Maurer as business was conducted. You could see our workings in real time just by refreshing the wiki periodically.

I made my first direct contribution to the standard by correcting the use of an indefinite article from “an” to “a”. My delight was observed by Richard Smith, the WG21 project editor, for which he offered a fist bump. It was a glorious moment. There is NO petty pedantry in CWG. It’s all important. Clarity must be maximised, ambiguity must be minimised.

We completed the Modules TS and moved on to the Concepts TS in the second session. I suddenly noticed just how much cable there was in the room. Everyone brings a laptop so that they can keep up with the wiki and that means power cables and plug adaptors for the international members. We are still a long way from the wireless, paperless office.

The final session of the standards meeting is another plenary where many motions are voted on, mostly along the lines of “Incorporate this paper into the standard”. Voting members include representatives from companies and national bodies, such as the British Standards Institution (BSI), as well as individual members. The rules about who can vote are complicated. Check with your national body or contact the convenor of WG21.

The BSI caucus met for lunch in The Prenup to consider some of the more controversial papers to see what our position would be.

I returned to CWG after lunch for more drive-by fixes to the Concepts TS, but I was summoned via IRC to LEWG to discuss the container papers, including Matthew Reece’s Colony proposal (P0447) which I was presenting on his behalf. As the day drew to a close we finished up as many LEWG proposals as we could, and added another function to std::string (P0457). We couldn’t attend to all the papers that were offered for scrutiny, so there are some which will be either postponed to the next meeting or will be analysed by LEWG experts in the interim.

There was no evening session. We repaired to my hotel bar. In general the host will try and arrange a single venue for meeting space and accommodation, but this time there were two hotels and a separate meeting venue, the Bahen Centre at the University of Toronto.

Day 6

The closing plenary session had a light-hearted, celebratory mood. The study groups reported on their activities this week, as did the working groups, and then we moved on to the motions. We moved coroutines, ranges, and networking TSes to editorial committee and publication, we advanced modules to ballot where it will be reflected on by the national bodies, and made modifications to the C++ working paper by including such papers as Howard’s Endian proposal.

We passed 36 motions altogether. The plenary isn’t a rubber stamp: some motions had objections and votes were taken. During the plenary I was notified by email from the BSI that I was able to vote: the process was complete. Fortunately, no motions were hanging by a thread, but it was good to raise my hand to register my support for the TSes.

With that, we were finished. We dawdled outside, chatting and promising to stay in touch, then retreated to the Prenup Pub for further beer and food, slowly drifting away as our schedules demanded. Weirdly, my plane seat was directly behind the BSI delegation chair and his wife, who had come for a holiday while he sweated over CWG.

I had the time of my life and I would choose this over a conference any time. Many thanks to my employers, Creative Assembly, for giving me the time to attend, and to the Standard C++ Foundation for funding my travel and accommodation.

Post script

Should you decide to attend a meeting for the first time, here is a to-remember list:

  • There is a wiki. Make sure you retrieve the URL and login details from another delegate.
  • All the groups are different in attendance, character and operation. Try them out.
  • wg21.link is your most useful tool.
  • Volunteer for things. History is made by those who turn up.
  • Everyone is a volunteer. Nobody is out to impress anybody.
  • If you don’t know something, take this rare opportunity to learn from the designers.
  • Sleep well, eat properly and stay hydrated. It’s easy to forget when you’re concentrating on other things.
  • Don’t be embarrassed about leaving sessions early: maybe you can’t contribute, or it’s over your head, or you don’t feel you can learn. Find somewhere else to learn or be useful. Or stay. Your choice.

Here are the things I volunteered for:

  • Reaching quorum at LWG
  • Writing a paper about unifying how the standard refers to Undefined Behaviour
  • Ranges TS editorial committee
  • Scribing
  • Reminding Jeffrey Yasskin, LEWG chair, that we need a graphics teleconference

I’ll be blogging about the graphics paper in the coming months. Stay tuned.