Created on 2005-03-18.00:00:00 last changed 162 months ago
[Voted into the WP at the September, 2008 meeting (resolution in paper N2762).]
Notes from the September, 2008 meeting:
The approach adopted in the resolution in paper N2762 was different from the suggestion above: it changes the definition of default initialization to include POD types and changes the third bullet to specify that “no initialization is performed.”
The definition of default initialization (9.4 [dcl.init] paragraph 5) is:
if T is a non-POD class type (clause Clause 11 [class]), the default constructor for T is called (and the initialization is ill-formed if T has no accessible default constructor);
if T is an array type, each element is default-initialized;
otherwise, the object is zero-initialized.
However, default initialization is invoked only for non-POD class types and arrays thereof (184.108.40.206 [expr.new] paragraph 15 for new-expressions, 9.4 [dcl.init] paragraph 10 for top-level objects, and 11.9.3 [class.base.init] paragraph 4 for member and base class subobjects — but see issue 510). Consequently, all cases that invoke default initialization are handled by the first two bullets; the third bullet can never be reached. Its presence is misleading, so it should be removed.
|2008-10-05 00:00:00||admin||set||messages: + msg1824|
|2008-10-05 00:00:00||admin||set||messages: + msg1823|
|2008-10-05 00:00:00||admin||set||status: open -> cd1|