Archive for March, 2011

C++ 2.0

Saturday, March 26th, 2011

Yes­ter­day, on March 25, 2011, the C++ stan­dards com­mit­tee signed off on the final draft of C++0x, the upcom­ing major revi­sion to C++.

After a month or so of edi­to­r­ial changes, proof­read­ing and inte­gra­tion of the last changes into the draft, it will be sent off for all the national bod­ies of ISO to vote on, and then we will offi­cially have a much-needed refresh of C++. Bar­ring any major sur­prises, the process should fin­ish later this year, offi­cially turn­ing C++0x into C++11.

Of course, many new fea­tures of C++0x are already avail­able in var­i­ous com­pil­ers, but later this year, all of them will become official.

A few reports from com­mit­tee mem­bers are already trick­ling out, and no doubt, there will be many more to follow:

I don’t have much more to add, other than to say a big thank you to the bril­liant peo­ple who have spent an awful lot of their time over the last 11 – 12 years to make this hap­pen. Of course, there have been a lot of casu­al­ties along the way (three “core” fea­tures were orig­i­nally envi­sioned for C++0x: an optional garbage col­lec­tor, con­cepts, and language-level sup­port for thread­ing. Of those, only the third sur­vived, although the two oth­ers may still make it into future revi­sions), but over­all, C++0x is a huge improve­ment to the lan­guage. Just a few of the fea­tures I am excited about:

  • lambda expres­sions
  • thread­ing support
  • rvalue references/move semantics
  • vari­adic templates
  • nullptr
  • sta­tic assertions
  • and of course, all the library addi­tions: hash tables, reg­u­lar expres­sions, type traits, tuples and many others.