Herb Sutter's profileSutter's MillBlog Tools Help

Blog


    11/1/2007

    Trip Report: October 2007 ISO C++ Standards Meeting

    The ISO C++ committee met in Kona on October 1-6. Here’s a quick summary of what we did, and information about upcoming meetings.

    What's in C++0x, and When?

    As I've blogged before (most recently here and here), the ISO C++ committee is working on the first major revision to the C++ standard, informally called C++0x, which will include a number of welcome changes and enhancements to the language itself as well as to the standard library.

    The committee is determined to finish technical work on this standard in 2009. To that end, we plan to publish a feature-complete draft in September 2008, and then spend the next year fine-tuning it to address public feedback and editorial changes.

    Note that this represents essentially a one-year slip from the schedule I blogged about at the beginning of the year. Why the slip? There are a few major features that haven't yet been "checked in" to the working paper and that are long poles for this release. Here are three notable ones:

    • concepts (a way to write constraints for templates that lets us get way better error messages, overloading, and general template usability)
    • advanced concurrency libraries (e.g., thread pools and reader-writer locks)
    • garbage collection

    Probably the biggest thing we did at this meeting was to choose time over scope: We decided that we can't ship C++0x without concepts, but we can and will ship without some or all of the other two.

    Concurrency: This was a pivotal meeting for concurrency. We voted a slew of concurrency extensions into the working draft at this meeting, as they happily all got to the ready point at the same time (see below for details):

    • memory model
    • atomics library
    • basic threads, locks, and condition variables

    And we decided to essentially stop there; we still plan to add an asynchronous future<T> type in C++0x, but features like thread pools are being deferred until after this standard.

    Garbage collection: For C++0x, we're not going to add explicit support for garbage collection, and only intend to find ways to remove blocking issues like pointer hiding that make it difficult to add garbage collection in a C++ implementation. In particular, the scope of this feature is expected to be constrained as follows:

    • C++0x will include making some uses of disguised pointers undefined, and providing a small set of functions to exempt specific objects from this restriction and to designate pointer-free regions of memory (where these functions would have trivial implementations in a non-collected conforming implementation).
    • C++0x will not include explicit syntax or functions for garbage collection or related features such as finalization. These could well be considered again after C++0x ships.

    What we voted into draft C++0x

    Here is a list of the main features we voted into the C++0x working draft at this meeting, with links to the relevant papers to read for more information.

    nullptr (N2431)

    This is an extension from C++/CLI that allows explicitly writing nullptr to designate a null pointer, instead of using the unfortunately-overloaded literal 0 (including its macro spelling of NULL) which makes it hard to distinguish between an null and a zero integer. The proposal was written by myself and Bjarne.

    Explicit conversion operators (N2437 and N2434)

    You know how in C++ you can make converting constructors only fire when invoked explicitly?

    class C {
    public:
      C( int );
      explicit C( string );
    };

    void f( C );

    f( 1 ); // ok, implicit conversion from int to C
    f( "xyzzy" ); // error, no implicit from string literal to C
    f( C("xyzzy") ); // ok, explicit conversion to C

    But C++ has two ways to write an implicit conversion -- using a one-argument constructor as above to convert "from" some other type, or as a conversion operator "to" some other type as shown below, and we now allow explicit also on this second form:

    class C {
    public:
      operator int();
      explicit operator string(); // <-- the new feature
    };

    void f( int );
    void g( string );

    C c;
    f( c ); // ok, implicit conversion from C to int
    g( c ); // error, no implicit from C to string
    g( string(c) ); // ok, explicit conversion to C

    Now the feature is symmetric, which is cool. See paper N2434 for how this feature is being used within the C++ standard library itself.

    Concurrency memory model (N2429)

    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)."

    Atomic types (N2427)

    Closely related to the memory model is the feature of atomic types that are safe to use concurrently without locks. In C++0x, they will be spelled "atomic<T>". Here's a sample of how to use them for correct (yes, correct!) Double-Checked Locking in the implementation of a singleton Widget:

    atomic<Widget*> Widget::pInstance = 0;

    Widget* Widget::Instance() {
      if( pInstance == 0 ) { // 1: first check
        lock<mutex> hold( mutW ); // 2: acquire lock (crit sec enter)
        if( pInstance == 0 ) { // 3: second check
          pInstance = new Widget(); // 4: create and assign
        }
      } // 5: release lock
      return pInstance; // 6: return pointer
    }

    Threading library (N2447)

    You might have noticed that the above example used a lock<mutex>. Those are now in the draft standard too. C++0x now includes support for threads, various flavors of mutexes and locks, and condition variables, along with some other useful concurrency helpers like an efficient and portable std::call_once.

    Some other approved features

    • N2170 "Universal Character Names in Literals"
    • N2442 "Raw and Unicode String Literals; Unified Proposal (Rev. 2)"
    • N2439 "Extending move semantics to *this (revised wording)"
    • N2071 "Iostream manipulators for convenient extraction and insertion of struct tm objects"
    • N2401 "Code Conversion Facets for the Standard C++ Library"
    • N2440 "Abandoning a Process"
    • N2436 "Small Allocator Fix-ups"
    • N2408 "Simple Numeric Access Revision 2"

    Next Meetings

    Here are the next meetings of the ISO C++ standards committee, with links to meeting information where available.

    • February 24 - March 1, 2008: Bellevue, Washington, USA (N2465)
    • June 8-14, 2008: Sophia Antipolis, France
    • September 14-20, 2008: San Francisco Bay area, California, USA (this is the anticipated date)

    The meetings are public, and if you're in the area please feel free to drop by.

    Comments (21)

    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:
    OMG! Yep, it’s true! I really can’t believe it is true but someone has actually filed a Class-Action lawsuit against IGE.buy cheap wow gold If you live under a rock, IGE is the largest gold supplying company.cheap wow gold Here is a brief tidbit of what the lawsuit is (thanks for the info Terra Nova): “The case involves IGE’s calculated decision to reap substantial profits by knowingly interfering with and substantially impairing the intended use and enjoyment associated with consumer agreements between Blizzard Entertainment and subscribers to its virtual world called World of Warcraft.” You can read the rest of the legal talk document back at Terra Nova.wow gold I’m still not sure what I think about this whole thing but I bet IGE has some really high-priced lawyers that may do the trick with getting them out of this.wow po wow gold wow gold kaufen wow gold
    Apr. 2
    No namewrote:
    OMG! Yep, it’s true! I really can’t believe it is true but someone has actually filed a Class-Action lawsuit against IGE.buy cheap wow gold If you live under a rock, IGE is the largest gold supplying company.cheap wow gold Here is a brief tidbit of what the lawsuit is (thanks for the info Terra Nova): “The case involves IGE’s calculated decision to reap substantial profits by knowingly interfering with and substantially impairing the intended use and enjoyment associated with consumer agreements between Blizzard Entertainment and subscribers to its virtual world called World of Warcraft.” You can read the rest of the legal talk document back at Terra Nova.wow gold I’m still not sure what I think about this whole thing but I bet IGE has some really high-priced lawyers that may do the trick with getting them out of this.wow po wow gold wow gold kaufen wow gold
    Apr. 2
    No namewrote:
    OMG! Yep, it’s true! I really can’t believe it is true but someone has actually filed a Class-Action lawsuit against IGE.buy cheap wow gold If you live under a rock, IGE is the largest gold supplying company.cheap wow gold Here is a brief tidbit of what the lawsuit is (thanks for the info Terra Nova): “The case involves IGE’s calculated decision to reap substantial profits by knowingly interfering with and substantially impairing the intended use and enjoyment associated with consumer agreements between Blizzard Entertainment and subscribers to its virtual world called World of Warcraft.” You can read the rest of the legal talk document back at Terra Nova.wow gold I’m still not sure what I think about this whole thing but I bet IGE has some really high-priced lawyers that may do the trick with getting them out of this.wow po wow gold wow gold kaufen wow gold
    Apr. 2
    No namewrote:
    OMG! Yep, it’s true! I really can’t believe it is true but someone has actually filed a Class-Action lawsuit against IGE.buy cheap wow gold If you live under a rock, IGE is the largest gold supplying company.cheap wow gold Here is a brief tidbit of what the lawsuit is (thanks for the info Terra Nova): “The case involves IGE’s calculated decision to reap substantial profits by knowingly interfering with and substantially impairing the intended use and enjoyment associated with consumer agreements between Blizzard Entertainment and subscribers to its virtual world called World of Warcraft.” You can read the rest of the legal talk document back at Terra Nova.wow gold I’m still not sure what I think about this whole thing but I bet IGE has some really high-priced lawyers that may do the trick with getting them out of this.wow po wow gold wow gold kaufen wow gold
    Apr. 2
    No namewrote:
    Earlier this week Hurricane Ivan did plenty of damage in the real world.buy cheap wow gold It also took a significant chunk out of a fantasy one when the Virginia server farm for Blizzard's World of Warcraft was inundated with water.cheap wow gold Fortunately.wow gold Blizzard was able to dry out the servers and get the realms back up by Wednesday evening.wow po This was significant in more ways than one.wow gold since returning beta testers got to investigate a whole passel of new content.wow gold kaufen as well as contend with an infestation of new players as the next round of beta testers entered the game.wow gold GameSpy beta testers.naturally.have been spending all the time they can exploring the new content in this hotly anticipated MMO. .
    Apr. 2
    No namewrote:
    Earlier this week Hurricane Ivan did plenty of damage in the real world.buy cheap wow gold It also took a significant chunk out of a fantasy one when the Virginia server farm for Blizzard's World of Warcraft was inundated with water.cheap wow gold Fortunately.wow gold Blizzard was able to dry out the servers and get the realms back up by Wednesday evening.wow po This was significant in more ways than one.wow gold since returning beta testers got to investigate a whole passel of new content.wow gold kaufen as well as contend with an infestation of new players as the next round of beta testers entered the game.wow gold GameSpy beta testers.naturally.have been spending all the time they can exploring the new content in this hotly anticipated MMO. .
    Apr. 2
    No namewrote:
    Earlier this week Hurricane Ivan did plenty of damage in the real world.buy cheap wow gold It also took a significant chunk out of a fantasy one when the Virginia server farm for Blizzard's World of Warcraft was inundated with water.cheap wow gold Fortunately.wow gold Blizzard was able to dry out the servers and get the realms back up by Wednesday evening.wow po This was significant in more ways than one.wow gold since returning beta testers got to investigate a whole passel of new content.wow gold kaufen as well as contend with an infestation of new players as the next round of beta testers entered the game.wow gold GameSpy beta testers.naturally.have been spending all the time they can exploring the new content in this hotly anticipated MMO. .
    Apr. 2
    No namewrote:
    Earlier this week Hurricane Ivan did plenty of damage in the real world.buy cheap wow gold It also took a significant chunk out of a fantasy one when the Virginia server farm for Blizzard's World of Warcraft was inundated with water.cheap wow gold Fortunately.wow gold Blizzard was able to dry out the servers and get the realms back up by Wednesday evening.wow po This was significant in more ways than one.wow gold since returning beta testers got to investigate a whole passel of new content.wow gold kaufen as well as contend with an infestation of new players as the next round of beta testers entered the game.wow gold GameSpy beta testers.naturally.have been spending all the time they can exploring the new content in this hotly anticipated MMO. .
    Apr. 2
    No namewrote:
    Earlier this week Hurricane Ivan did plenty of damage in the real world.buy cheap wow gold It also took a significant chunk out of a fantasy one when the Virginia server farm for Blizzard's World of Warcraft was inundated with water.cheap wow gold Fortunately.wow gold Blizzard was able to dry out the servers and get the realms back up by Wednesday evening.wow po This was significant in more ways than one.wow gold since returning beta testers got to investigate a whole passel of new content.wow gold kaufen as well as contend with an infestation of new players as the next round of beta testers entered the game.wow gold GameSpy beta testers.naturally.have been spending all the time they can exploring the new content in this hotly anticipated MMO. .
    Apr. 2
    Picture of Anonymous
    Apr. 2
    Mar. 31
    No namewrote:
    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:
    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:

    After Sharkkis wow power leveling dies the DPS moves on to Tidalvess. wow power leveling He is the next target wow level service and will deal a lot of cheap wow power leveling damage to the raid. cheap wow power leveling Until this point the tank of Tidalvess and his healers were being hit by the Firespit totems and healing through the damage, but now you can't ignore the totem any longer. wow powerleveling If you don't damage it the raid will take too much damage. wow powerleveling It must be focused wow powerleveling by ranged wow powerlevelingDPS as soon as it spawns. wow leveln It will help your wow powerleveling healers' mana a lot!.

    Mar. 25
    Mar. 22
    Picture of Anonymous
    (没有名字) wrote:

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

    Mar. 22
    Picture of Anonymous
    (没有名字) wrote:

    我以为感情就应该这样杭州写字楼装修一帆风顺,朋友们都羡慕我补漏公司命好,碰到一个这样杭州空调拆装疼惜我的杭州房屋装修男人。我几乎新房装饰是毫无保留地喜欢洗衣机维修他,学校里针尖大的杭州装潢公司事情都要告诉杭州搬家他,他总是笑着摸摸杭州空调维修的头然后轻轻把我揽进装饰公司怀里。我也帮他做杭州装修家务

    Mar. 22
    Feb. 25
    No namewrote:

    After talking about so many skills and contentions of SEO,in fact,it is difficult to do SEO industry well,especially wow gold world of warcraft gold wow gold kaufen buy wow gold wow geld wow gold world of warcraft gold wow po under the current environment in China.

    Firstly we are faced with the confusion of customers’ mind and excessive expectation.

      Because of the various reasons,most clients apparently think the effect of SEO can be seen in one or two months.Most people world of warcraft gold wow po wow or wow gold world of warcraft gold wow gold kaufen buy wow gold wow geld wow gold just only pay attention to the current profits and wish the websites’ flux can be induced fast,whereas not pay attention to the effect in 2 or 3 yeares ,even in 5 or 10 years.

      Not to mention some people to equate wow or wow gold world of warcraft gold wow gold kaufen buy wow gold wow geld wow gold the SEO and cheating.

      If you want to persuade clients to set up the correct concept,that will be a extraordinarily difficult thing,you should fight with all the social environment.

      Secondly,some specious personnel world of warcraft gold wow po wow or wow gold world of warcraft gold wow gold kaufen buy wow gold wow geld wow gold world of warcraft gold wow po wow or from SEO industry disarrange this vocation continuously.

    Various wrong information,rankings pledge,service prices drop lower and lower,using the cheating method or rubbish method,these aggravate the disadvantage of all the industry and social impressions without fail.

                  

    Feb. 22
    Picture of Anonymous
    Maxim Yanchenko wrote:
    Hi Herb, thank you and all the committee for all the hard work!
    Nov. 11

    Trackbacks (4)

    The trackback URL for this entry is:
    http://herbsutter.spaces.live.com/blog/cns!2D4327CC297151BB!330.trak
    Weblogs that reference this entry