This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Voted into WP at August, 2010 meeting.]
The changes for delegating constructors overlooked the need to change 11.9.3 [class.base.init] paragraph 3:
The expression-list in a mem-initializer is used to initialize the base class or non-static data member subobject denoted by the mem-initializer-id. The semantics of a mem-initializer are as follows:
if the expression-list of the mem-initializer is omitted, the base class or member subobject is value-initialized (see 9.4 [dcl.init]);
otherwise, the subobject indicated by mem-initializer-id is direct-initialized using expression-list as the initializer (see 9.4 [dcl.init]).
The initialization of each base and member constitutes a full-expression. Any expression in a mem-initializer is evaluated as part of the full-expression that performs the initialization.
This paragraph deals only with subobjects; it needs to be made more general to apply to the complete object as well when the mem-initializer-id designates the constructor's class.
Proposed resolution (June, 2008):
Change 11.9.3 [class.base.init] paragraph 3 as follows:
The expression-list in a mem-initializer is used to initialize the base class or non-static data member subobject denoted by the mem-initializer-id. The semantics of a mem-initializer areA mem-initializer in which the mem-initializer-id names the constructor's class initializes the object by invoking the selected target constructor with the mem-initializer's expression-list. A mem-initializer in which the mem-initializer-id names a base class or non-static data member initializes the designated subobject as follows:
if the expression-list of the mem-initializer is omitted, the base class or member subobject is value-initialized (see 9.4 [dcl.init]);
otherwise, the subobject indicated by mem-initializer-id is direct-initialized using expression-list as the initializer (see 9.4 [dcl.init]).
...
The initialization
of each base and memberperformed by each mem-initializer constitutes a full-expression. Any expression...
Notes from the September, 2008 meeting:
This text was significantly modified by N2756 (nonstatic data member initializers) and needs to be reworked in light of those changes.
Proposed resolution (February, 2010):
Change 11.9.3 [class.base.init] paragraph 7 as follows:
The expression-list or braced-init-list in a mem-initializer is used to initialize the
base class or non-static data member subobject denoted by the mem-initializer-iddesignated subobject (or, in the case of a delegating constructor, the complete class object) according to the initialization rules of 9.4 [dcl.init] for direct-initialization.[Example: ...
—end example] The initialization
of each base and memberperformed by each mem-initializer constitutes a full-expression...
Change 11.9.3 [class.base.init] paragraph 8 as follows:
IfIn a non-delegating constructor, if a given non-static data member or base class is not named by a mem-initializer-id...
Change 11.9.3 [class.base.init] paragraph 10 as follows:
InitializationIn a non-delegating constructor, initialization proceeds in the following order:
Change 11.9.3 [class.base.init] paragraph 12 as follows (this is an unrelated change correcting an error noticed while preparing the resolution of this issue):
Names in the expression-list or braced-init-list of a mem-initializer are evaluated in the scope of the constructor...
Change the next-to-last bullet of the note in 9.4.5 [dcl.init.list] paragraph 1 as follows:
as a base-or-member initializer in a
mem-initializer (11.9.3 [class.base.init])