IBM Z and LinuxONE - Languages - Group home

Sept 14-20, 2008 C++ Standard Meeting Trip report

  

Well, this is it!


In this meeting, we voted out a Committee Draft for the new C++0x,

which means all the work items are complete.This is like the C++0x

Standard going out as a Beta. A link to the draft C++ Standard is in

the Overview page under the Links section.


This draft will be available for public comment which we expect to take

all of 2009. The plan is that after addressing those public comments, the committee hope

to vote out a Final Committee Draft for more comments in 2010,

then its straight to the Final Draft International Standard, and then

it becomes an ISO Standard.

But those plans could change, if there are surprises in the comments.

You can find the link to draft in the forum section under C++0x Schedule


Its been 4 years of serious work, with the first item voted in 2004 in

Lillehammer. Here is a quick recap of what we did in the September 2008

meeting:

1. Concepts finally got voted into the core language part of the Working Draft.


Most of the standard library got conceptualized, too, but not all of

it. The rest of the library will get conceptualized over the course of

the next few meetings.


2. Yours truly's (Michael Wong's) paper on User-defined Literals

(formerly known as Extensible Literals) was finally voted into the core

language! This idea was initiated by IBM's Ian McIntosh.

3. Yours truly's (Michael Wong's) paper on attributes in C++ was also voted into the

core language.

3.1 Standard attributes for data-dependency ordering in multithreading

programs were added to the core language, by IBM's Paul Mckenney

4. The Working Draft was voted out as a Committee Draft for ISO ballot.

In about a year, the committee will issue a Final Committee Draft for

ISO ballot, and a year from that, the committee will issue a Final

Draft International Standard (FDIS). After the the FDIS ballot, the

FDIS will become the new International Standard, assuming nothing goes

wrong.


5. The Decimal TR was voted out for ISO ballot, by IBM's Robert Klarer

6. The special math functions from TR1 were voted out as the subject of

a Committee Draft that will eventually become its own International

Standard (i.e. the special math functions will not be in C++0x, but

they will be a separate standard).


7. The COW technique for implementing std::basic_string has been

outlawed in C++0x. This means that the std::string that we provide will

no longer be conforming in single-threaded mode (we don't currently do

Copy On Write/Reference Counting in multi-threaded mode because it's

not threadsafe).


8. You can now initialize non-static members of a class using C-style initializers syntax. Example:


int foo();


struct S {

static const int a = 1; // OK in C++2003, OK in C++0x

int b = 5; // Error in C++2003, OK in C++0x

int c = foo(); // Error in C++2003, OK in C++0x

struct C {

double real;

double imag;

};

// Initializer list:

C c_object = { 0.0, 0.0 }; // OK in C++0x

};


/* Equivalent to: (this is OK in C++2003)


struct S {

static const int a = 1;

S() : b(5), c(foo()), C_object(0.0, 0.0) {}

int b;

int c;

struct C {

double real;

double imag;

};

C c_object;

};


*/


9. enumerations can now be forward declared, as long as the compiler

has enough information to decide the underlying type of the enum


example:


enum my_colours : short; // forward declaration of my_enum with underlying type short int


// When you redeclare the enum, you have to restate the enum-base specifier:

enum my_colours : short { red = 0, green, blue, yellow };


10. A library was adopted for asynchronous futures in multithreading programs.

11. A paper to support bi-directional fences was voted in. This will support IBM's PowerPC architecture.