Channels ▼

Trip Report, October 2002

February 2003/The New C++

Copyright © 2002 Herb Sutter

I'm going to spend this column reporting on happenings at and around the most recent C++ Standards meeting, because things are now heating up, at least a little. In particular, the first two proposals for C++ Standard library extensions have now been accepted by the committee — and it's something of a breakthrough, in that this represents the first new work to be accepted since the first round of standardization was completed in 1997!

First, a Word from Our Technical Corrigendum

Since 1998, the C++ Standards committee has spent most of its time processing queries and potential minor bug fixes to the existing Standard. In my writing, I've sometimes referred to a few of the more notable bug fixes; for example, in Item 7 of More Exceptional C++ [1], I mentioned that we were adding the requirement that a std::vector's internal storage be contiguous, so that a programmer can take a pointer to some element inside a vector and safely do pointer arithmetic to traverse the vector's contained elements just like an array. I've also mentioned that the first batch of these are being published as Technical Corrigendum 1 (a.k.a. "TC1"; think of it as "service pack 1") to the C++ Standard.

Some astute readers, including Daniel Spangenberg, have asked why they can't seem to find an official copy of this much-vaunted TC1. I blush — the unfortunate truth is that sometimes ISO wheels grind exceedingly slowly. Although the first batch of corrections was approved by the committee back in October of 2000 (yes, really two years ago), it took another couple of meetings before the final text could be prepared and carefully proofread, and the TC document only just went out for ISO balloting in November 2002 and that final international voting will conclude in mid-February of 2003. We don't expect any surprises; if so, then the TC will be official around the time you read this.

In the meantime, I'd like to remind everyone of some long-standing good news: you don't have to wait for ISO to issue new documents to stay up to date on the committee's work (and you can be sure that your compiler vendor doesn't wait that long). You can always get an up-to-date list of all issues and their status right from the ISO C++ committee's website at <>. Again, that's "all" issues, not just the ones resolved in TC1.

If and when you do peruse the issues via the ISO C++ website, be sure to check both the Core and Library issues lists, because language and library issues are tracked separately. There are three major categories of issues:

  • Defect Reports are things that the committee agrees need to be fixed (anything from typos to unclear wording to actual errors) along with the appropriate corrections to the Standard that fix them.
  • Active Issues are issues under active consideration. These include brand-new issues that have been received since the last meeting, as well as issues that have been discussed at prior meetings, but for which the committee still needs to invest further thought or work before committing to a specific resolution.
  • Closed Issues are issues that have been handled without need for further action. Some of these are readers' requests for clarification or interpretation, which can be (and is) given without needing any change to the Standard. Others are interesting items, but outside the realm of "bug fixes" — for example, we explicitly decided not to consider extension requests during the first few years after the Standard was produced — and have been tagged for "future" consideration in the next standard, C++0x. (Those are now beginning to be considered, now that it's open season on actual extensions; see below.)

News from the Front

Here's a quick update on the C++ committee's goings-on at the most recent meeting. For a more complete backgrounder on the current C++ Standards process, published exactly a year ago and still pretty current, see [2], which is my initial "The New C++" column.

The C++ Standards committee (ISO WG21, ANSI J16) met in Santa Cruz from October 20-25, 2002. The C++ committee is currently busy with the following major pieces of work:

Issues and Defect Reports (DRs). The committee continues to spend about half its time answering queries about the existing Standard, issuing clarifications, and fixing bugs (including typos and small inconsistencies). There have been several new fixes approved since TC1 was finalized; it remains to be seen whether there will be a second interim Technical Corrigendum, or whether the updates will just be rolled straight into the next major revision of the Standard, C++0x.

Evolution Working Group (EWG). The C++ Evolution Working Group is now actively considering extensions for the next full revision of the C++ Standard. The EWG is normally chaired by Bjarne Stroustrup, but as he couldn't attend this meeting I chaired it in his absence. (I think Bjarne has only missed about four meetings in the decade-plus history of C++ standardization; it doesn't happen often, and he continues to be very active in C++ Standards work.) What kinds of things does the EWG consider? Well, library-related issues, such as new containers and things like tuples, are already being considered as part of the Library TR noted below. But the Library TR cannot consider extensions to the core C++ language itself, and this is where the EWG comes in as the first filter to consider new proposals to extend the C++ language.

The Evolution group's goal at this meeting was to consider the initial batch of concrete proposals, and to offer the authors guidance on which ones we were interested in and how to refine them. We considered about a dozen proposals, ranging from my typedef templates paper to Bjarne Stroustrup's typeof proposal, from compile-time assertions to move constructors, and the authors have the feedback they need to go back and refine their proposals for further consideration at the next meeting. (I think the next meeting promises to be interesting — just as we had the very first new library extensions since 1997 approved at this meeting (see below), we might just get the very first new language extensions since 1997 approved at the next meeting in April 2003. Time will tell; watch this space for updates.)

Library Technical Report (TR). Well, we're actually working on two Technical Reports, but the Library TR in particular is the most noteworthy one because it's definitely intended for direct inclusion the next C++ Standard, a.k.a. C++0x [3]. While the Evolution WG concentrates on refinements to the core language, the Library TR is all about adding new functionality to the standard library; the original intent was to get a head start on the next round of standardization, which is expected to include aggressive additions to the standard library.

If the Evolution WG is now reviewing proposals, why continue with a separate Library TR? Because people hope the Library TR can be finalized sooner (say, perhaps in two years) than we could finalize a review-ready draft of the whole next C++0x Standard.

At this meeting, the big Library TR news was that the first two library extensions were approved for the Library TR! In brief, they are:

  • Doug Gregor's proposal for polymorphic function object wrappers [4].
  • Jaakko Järvi's proposal for tuple types [5].

That's why I say that things are heating up, at least a little — after several years of maintenance-only mode and about a year of talking about extensions, these are finally the first two extensions to the C++ Standard library to be actually accepted by the committee since the first standard was finalized in 1997. They are certainly a harbinger of many more to come, as we considered well over a dozen library and language extension proposals at this meeting.

Are you wondering what these two new extensions are all about? If so, then keep reading this column — in the next two installments, I'll cover each of these two accepted library extensions in detail. Then I'll be writing the column after that just in time to report on the next C++ meeting, to be held in Oxford in early April of 2003, where it's likely that the first new C++ language (not just library!) extensions will be presented for vote by the committee. Stay tuned.


[1] H. Sutter. More Exceptional C++ (Addison-Wesley, 2002).

[2] H. Sutter. "The New C++," C/C++ Users Journal, February 2002.

[3] The other one is the Performance TR, which is focused primarily on hardware issues, embedded systems work, and C++ implementability (e.g., how to implement and use exceptions for best performance). The Performance TR is currently in balloting and should be published in early 2003.

[4] D. Gregor. "A Proposal to Add a Polymorphic Function Object Wrapper to the Standard Library," ISO/ANSI C++ standards committee paper (ISO/IEC JTC1/SC22/WG21 paper N1402, ANSI/NCITS J16 paper 02-0060).

[5] J. Järvi. "Proposal for Adding Tuple Types into the Standard Library," ISO/ANSI C++ standards committee paper (ISO/IEC JTC1/SC22/WG21 paper N1403, ANSI/NCITS J16 paper 02-0061).

Herb Sutter (<>) is convener of the ISO C++ standards committee, author of the acclaimed books Exceptional C++ and More Exceptional C++, and one of the instructors of The C++ Seminar (<>). In addition to his independent writing and consulting, he is also C++ community liaison for Microsoft.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.