Herb Sutter's profileSutter's MillBlog Tools Help

Blog


    2/7/2007

    ISO C++0x: Complete Public Review Draft In October 2007?

    You might say that it looks like "x might not be hex."

    I'm happy to report that work on "C++0x", the much-anticipated Version 2.0 of the ISO C++ standard, has dramatically picked up steam over the past few months. The ISO C++ committee has now published the first partial draft of C++0x (for what "partial" means and what's still missing, see below), and plans to publish a complete public draft before the end of 2007.

    In this article I'll give a quick history of the C++ standard and the current expected timeline. I'll also summarize (drum roll please) which major features the committee decided to put in C++0x and the features that didn't make the cut. In the coming months, I'll go into more detail about these major features as they gel.

    From C++98 until now: The story so far

    It's hard to believe it's been nearly a decade since my first "C++ State of the Union" article appeared in C++ Report. That article, which I wrote on the way home from the July 1997 C++ standards meeting, anticipated correctly that the committee would manage to work through their large bug backlog and vote out a final Draft International Standard at the November 1997 meeting. That they did, to much cheering and fanfare and even a press conference from the main committee room, despite some last-minute excitement involving auto_ptr. ISO took its usual 6-12 months to process red tape, and the first edition of ISO Standard C++ was published in 1998 (aka C++98).

    After 1997, the committee deliberately slowed down so as to give the compilers time to catch up to the many innovations in the standard. We've been meeting only two (not three) times a year, and from 1998-2003 we limited ourselves to just processing defect reports (bug fixes and requests for clarification) and no new features, to keep the standard stable. In 2002, we finally produced "service pack 1" of the C++ standard, which was published in 2003 (aka C++03).

    Then the gates reopened and "C++0x" got underway. New features have been under serious development since 2003-4, and the committee has long had a target of publishing the next C++ standard by the end of the decade; that's why it has been called "C++0x". (If that schedule fails, we can always make the awkward joke that it's still C++0x, only x is a hexadecimal number, ha ha. But we'd rather finish on time.)

    About C++0x

    ISO C++ timeline proposals, October 2006

    C++0x target timeline

    At the most recent ISO C++ meeting, in October 2006, we considered two main timeline options. They are pictured at right, in a copy of a slide I showed during that meeting to spur discussion. In the first option, we actually publish in 2009 and legitimately get to be called "C++09". In the second, we finish the document in 2009, but because ISO takes most of a year to approve and publish a standard, it would end up as "C++10" (or, one could uncomfortably imagine, "C++0a").

    The committee wrung its collective hands, and decided to put in overtime to make the first path happen. Working backward, the dates that need to be hit are:

    • 2009: Publish "ISO/IEC 14883(2009): Programming Language C++"
    • October 2008 ISO C++ meeting: Complete the final text of C++0x and vote it out for balloting, having crossed all the t's and dotted all the i's, and in particular having addressed all public comments received during the public review period.
    • October 2007 ISO C++ meeting: Complete the first complete draft of C++0x and vote it out for public review and comments.

    Given the work that remains, this means meeting more frequently than we've been doing for the past decade. For 2007, the committee agreed to let me put it back on a three-full-meetings schedule, and so for the first time since 1997 we're having a July meeting. On top of that, subgroups have been organizing additional smaller meetings in between on specific topics, such as concepts. I'll summarize the meeting schedule at the end of this article.

    What's in C++0x

    You can get a very good feel for the contents of C++0x by looking at the first partial draft mentioned above. That draft contains the bulk of the extensions the committee pulled in from the first C++ Standard Library Extensions Technical Report (TR1). It does not, however, contain text for all major features yet, and has placeholders for the major features that I'll summarize in this section.

    Barring a disaster, here are the following additional major features not yet in the above partial draft that will be in C++0x. Every bullet heading links to a good "read this first" paper about the feature, and for some I've included additional links.

    Concepts [N2081]

    From that paper:

    "Concepts introduce a type system for templates that makes templates easier to use and easier to write. By checking the requirements that templates place on their parameters prior to template instantiation, concepts can eliminate the spectacularly poor error messages produced by today’s template libraries, making them easier to use. ... At the core of concepts is the idea of separate type checking for templates. Template declarations are augmented with a set of constraints (requirements): if the definition of the template typechecks against these requirements, and a use of a template meets these requirements, then the template should not fail to instantiate."

    Imagine, if you will, an error message like 'sorry, YourType isn't a BidirectionalIterator' instead of three pages of arcane messages about what templates couldn't be instantiated. Among other things, concepts will let us write the standard's own container and iterator requirements in code, rather than as English "cookbooks" of programming conventions.

    The concepts proposal is coauthored by Bjarne Stroustrup and Doug Gregor. You can already start trying them out: There is a ConceptGCC proof-of-concept implementation that covers most of the proposal. For more details about how concepts can be applied to the C++ standard library, see also papers N2082, N2083, N2084, and N2085.

    Garbage collection [N2129]

    A C++0x compiler must provide garbage collection, which the programmer can use on request; "don't GC this region of code" is still the default. This "opt-in" model leaves existing programs' semantics unchanged, while providing real GC support for programs that want it. It is also intended to enable garbage collection for objects allocated and manipulated by most legacy libraries, which both makes it much easier to convert existing code to a garbage-collected environment and helps "repair" legacy code with deficient memory management. Of course, any C++98/03/0x compiler is already free to garbage-collect the whole C++ heap, and a number of current implementations do that; but they aren't required to do so, and this change would require GC to be available in a way that programmers can use and rely on. This work has been primarily driven by Hans Boehm and Mike Spertus. You can find a detailed paper here: N2128.

    Memory model for concurrency [N2138]

    As I wrote in "The Free Lunch Is Over", chip designers and compiler writers "are under so much pressure to deliver ever-faster CPUs that they’ll risk changing the meaning of your program, and possibly break it, in order to make it run faster." This only gets worse in the presence of multiple cores and processors.

    A memory model is probably of the lowest-level treaty between programmers and would-be optimizers, and fundamental for any higher-level concurrency work. Quoting from my memory model paper: "A memory model describes (a) how memory reads and writes may be executed by a processor relative to their program order, and (b) how writes by one processor may become visible to other processors. Both aspects affect the valid optimizations that can be performed by compilers, physical processors, and caches, and therefore a key role of the memory model is to define the tradeoff between programmability (stronger guarantees for programmers) and performance (greater flexibility for reordering program memory operations)." This work is being driven primary by Hans Boehm, Clark Nelson, and myself.

    Concurrency libraries [N2094]

    The committee will likely release the concurrency libraries in two parts, both of which are likely to be released at about the same time.

    • In C++0x itself: Support at the level of basic threads and locks, as well as atomic operations for lock-free coding, and related features like thread local storage.
    • In the second C++ Standard Library Extensions Technical Report (aka Library TR2): More advanced extensions including futures and upgradable locks, so that we can gain experience with them before considering them for the standard itself post-C++0x. This follows the same path the committee took with the first set of library extensions, including shard_ptr and the hash-based containers: Those were first put into a separate TR (TR1), completed in 2004, and then based on experience most TR1 features were voted into the standard itself in April 2006 so that they are now part of the current partial draft of C++0x. The TR2 features are planned to be on a similar path, but for now are being released as a separate specification and not part of C++0x.

    For more information and snapshots of current draft proposals still under discussion and development, see: N1907, N1966N2047, and N2090.

    What's not in C++0x

    The following major features were cut from C++0x because they require more work and would delay the next standard. Once C++0x is done, the committee may pick them up again.

    Modules [N2073]

    It's definitely desirable to have a module system for C++ to package libraries and their implementations, and to provide an alternative to C++'s current build model based on textual source file inclusion. Reliance the current source file inclusion model poses technical difficulties for large C++ programs, notably: (a) long build times for large projects; and (b) difficulty of managing dependencies between interfaces and implementations. The current work has been spearheaded primarily by Daveed Vandevoorde (of EDG fame). The committee still intends to do work on this, but it's now planned as a separate Technical Report on Modules after C++0x is complete rather than as part of the C++ standard.

    Dynamic libraries [N1496]

    Although C++ programmers routinely use shared libraries in C++ today, the C++ standard doesn't specify their semantics in a portable way. Indeed, there are some fundamental semantic differences between some popular approaches, such as between Windows static and dynamic libraries and Linux shared libraries. Note that C++'s broad cross-platform support, and the existence of many existing approaches on those different platforms, makes it more difficult to specify portable library semantics than in languages like Java that started fresh with their own (then-new) run-time environment. Several committee members, notably Pete Becker, have done work to try to reconcile the existing approaches in a standard way that implementers could broadly support, but this effort will not be ready in time for C++0x.

    Next Steps

    Here's the current list of 2007 meetings, with the "extra" meetings and milestones bolded:

    • Jan 22-24, Batavia, IL, USA: Ad-hoc subgroup meeting on library working group issue cleanup.
    • Feb 22-23, Mountain View, CA, USA: Ad-hoc subgroup meeting on concepts.
    • Apr 15-20, Oxford, UK: Full WG21/J16 spring meeting.
    • Jul 15-20, Toronto, Canada: Full WG21/J16 extra meeting.
    • Sep 29 - Oct 6, Kona, HI, USA: Full WG21/J16 fall meeting. (Extended to Saturday.)
      Goal: Vote out the first complete public review draft of C++0x on Oct 6.

    The extra meetings exist specifically to reach the goal of having that full draft before the end of this year. We'll know as we get closer how well the working paper is coming together.

    Regardless of when the first public review draft is published, don't expect it to be the final text: The draft is to get a round of public comments, and we know there will be issues to refine and tweak over the following year. But that first complete public draft will contain standardese for all major C++0x features in near-final form, which is quite a milestone (and quite a mouthful). It will give us the first real and concrete look at the shape of C++0x.

    Over the coming months I'll be posting additional articles about specific features in the new standard, including some of the cool new features mentioned above. Stay tuned.

    Comments (39)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    Herb Sutter has turned off comments on this page.
    No namewrote:
    美容美容,
    減肥減肥,
    環保袋環保袋,
    迷你倉迷你倉,
    租車租車,
    機場接送機場接送,
    家居風水家居風水
    客貨車客貨車
    新娘化妝
    婚紗攝影
    台灣銀行外幣匯率台灣銀行外幣匯率
    風水風水
    二手辦公室傢俬二手辦公室傢俬,二手辦公室傢俬
    普通話課程普通話課程,
    深圳婚紗相深圳婚紗相,
    PutonghuaPutonghua,
    黃金價格黃金價格 ,
    MandarinMandarin,
    深圳婚紗攝影深圳婚紗攝影,
    ,成立公司成立公司,
    公司註冊公司註冊,
    門禁門禁
    Apr. 4
    Apr. 2
    Picture of Anonymous
    Apr. 2
    No namewrote:

    The best headphones for mp3 players are the most important mp3 accessory for your mp3 player. mp3 player It isn't really an accessory, as it is mp3 player required for you to enjoy its music. cheap mp3 player As such, you'll want to get the best headphones for your mp3 players.Sometimes they are even disregarded. buy mp3 player People rather look at the colorful and shiny mp3 player itself, with its cheap wow power leveling leek design and attractive graphic display. mp3 player However, no matter if it's the best buy mp3 player sounding mp3 player, the final and most important step between the music and your ears is left to the headphones. MP3 PLAYER kaufen Those are the sole elements responsible for translating the electric audio signals back into the air vibrations commonly known as sound.So, don't go overboard and buy the most expensive mp3 player, and then stick with MP3 PLAYER kaufen some low quality headphones. mp3 player To truly experience mp3 player music any music you need to hear it right. That's why you should get the best headphones for mp3 players you can find.

    Mar. 25
    No namewrote:
    As players make their way through the quests wow gold and start leveling up, it quickly becomes wow gold kaufen clear just how well balanced World of Warcraft is at allowing people to decide whether they want to go solo, or group with others to get things done. wow gold This all comes down to how well balanced the different classes are in the game. wow gold kaufen It shouldn’t come as a surprise that something like a warrior, or a rogue, or a hunter in this game can handle themselves quite well going it alone in WoW, but it is very impressive to see magic users like the mages, and priests being able to hold their own while soloing (albeit with a little more difficulty). wow gold Even more impressive is that priests achat wow gold can become very viable damage dealers thanks to the way their talent tree is set up, a very welcome change from the traditional heal-bot nature that priest-like classes have suffered from in the past. wow po As one gets to the higher levels, more of the quests become something designated as "Elite" quests. achat wow gold These involve fighting particularly strong enemies, and will require grouping in order to complete them well. Cheapest wow gold It is a good way to make sure players are Cheapest wow gold well-trained when they hit the end game material, but for those who would prefer to solo all the way to level 60, there are still a decent number of soloable quests available
    Mar. 25
    No namewrote:
    With the dust settling wow gold now on World of Warcraft, it is wow po becoming more and more obvious that this is by far the best MMORPG currently on buy cheap wow gold the market. buy cheap wow gold It manages to walk a line that wow gold makes the game appealing both to the hardened power gamer, and casual weekend wow gold warrior, where both cheap wow gold can enjoy the game in their own special way, without stepping on each other's toes. cheap wow gold If you are looking for a new game wow gold kaufen in the genre, you would be doing yourself a terrible disservice by wow gold kaufen overlooking World of Warcraft.
    Mar. 25
    Picture of Anonymous
    Mar. 24
    No namewrote:
    In Maple Story, players will be able to create characters that will grow as they learn new skills and become stronger. There are four characters to choose from: Warriors, Bowmen, Magician, or Thief. These characters can be dressed in many different and colorful outfits. Personalizing characters is one of the goals of Maple Story. Once a character has been created, they will learn skills that will help them when they reach Victoria Island.
    Mar. 20
    Mar. 20
    Mar. 20
    Mar. 20
    Picture of Anonymous
    dave wrote:
    Dig your yellowpages,a wiki model english phrase dictionary. You can make friends by sharing you favorites in duyp
    digg phrase http://www.duyp.net
    kid blog:
    preschool education http://www.xugu.net
    school friend http://www.61bay.net
    shop http://shop.61bay.com
    directory http://www.qxiu.net
    Mar. 15
    Picture of Anonymous
    (没有名字) wrote:

    杭州装饰礼服是最近明星们杭州空调维修偏爱的,尤其是出席杭州搬家公共场合,既不会显得杭州补漏随便,也不会不够杭州装修公司性感。当然,深V礼服杭州装饰公司不仅仅是杭州装潢明星们偏爱,要去杭州家政参加派对的你也可以尝试啊!你知道了男人的杭州店面装修这一心理状态,就在他处于办公楼装修低潮的时候主动接近他、鼓励杭州电脑维修他、静听他杭州空调拆装的倾诉无论是装饰工程公司聚会场合,或是出外家居装饰游玩,都一定会拍照装饰公司留下纪念!但回家检视杭州洗衣机维修相簿时杭州开锁高呼后果

    Mar. 13
    No namewrote:
    Mar. 8
    No namewrote:
    In Maple Story, players will be able to create characters that will grow as they learn new skills and become stronger. There are four characters to choose from: Warriors, Bowmen, Magician, or Thief. These characters can be dressed in many different and colorful outfits. Personalizing characters is one of the goals of Maple Story. Once a character has been created, they will learn skills that will help them when they reach Victoria Island.
    Mar. 8
    Mar. 8
    Mar. 8
    Mar. 8
    Picture of Anonymous
    (没有名字) wrote:

    杭州装饰礼服是最近明星们杭州空调维修偏爱的,尤其是出席杭州搬家公共场合,既不会显得杭州补漏随便,也不会不够杭州装修公司性感。当然,深V礼服杭州装饰公司不仅仅是杭州装潢明星们偏爱,要去杭州家政参加派对的你也可以尝试啊!你知道了男人的杭州店面装修这一心理状态,就在他处于办公楼装修低潮的时候主动接近他、鼓励杭州电脑维修他、静听他杭州空调拆装的倾诉无论是装饰工程公司聚会场合,或是出外家居装饰游玩,都一定会拍照装饰公司留下纪念!但回家检视杭州洗衣机维修相簿时杭州开锁高呼后果

    Mar. 7
    No namewrote:
    In The Lord of the Rings OnlineTM: Shadows of AngmarTM (LOTRO), players can customize
    certain elements of the game's user interface (UI), also known as "skinning." While we
    don't allow you to do a full-scale UI replacement, we do give you the ability to replace
    selected visual elements of the UI. (A full list of these elements and their sizes is
    provided at the end of this overview.)
    This is an updated (and prettied up) version of the information that had originally been
    posted in their Beta forums which we had copied to our Developer Discussions - Tutorials &
    Other Helpful Information forum. It is a combination of the Skinning the LOTRO UI and Art
    Mar. 2