- Title
- Initialization not specified for forwarding constructors
- Status
- c++11
- Section
- 11.9.3 [class.base.init]
- Submitter
- Alisdair Meredith
Created on 2007-10-17.00:00:00 last changed 151 months ago
Messages
Date: 2010-08-23.00:00:00
[Voted into WP at August, 2010 meeting.]
Date: 2010-02-15.00:00:00
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 [Example: ...
—end example] The initialization Change 11.9.3 [class.base.init] paragraph 8 as
follows: Change 11.9.3 [class.base.init] paragraph 10 as follows: 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): Change the next-to-last bullet of the note in 9.5.5 [dcl.init.list] paragraph 1 as follows:
base class
or non-static data member subobject denoted by the
mem-initializer-id designated subobject (or, in
the case of a delegating constructor, the complete class
object) according to the initialization rules of
9.5 [dcl.init] for direct-initialization.of each base and
member performed by each mem-initializer
constitutes a full-expression...
If In a non-delegating constructor, if a given
non-static data member or base class is not named by a
mem-initializer-id...
Initialization In a non-delegating constructor,
initialization proceeds in the following order:
Names in the expression-list or
braced-init-list of a mem-initializer are
evaluated in the scope of the constructor...
as a base-or-member initializer in a
mem-initializer (11.9.3 [class.base.init])
Date: 2008-09-15.00:00:00
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.
Date: 2008-06-15.00:00:00
Proposed resolution (June, 2008): Change 11.9.3 [class.base.init] paragraph 3 as follows:
if the expression-list of the mem-initializer
is omitted, the base class or member subobject is value-initialized
(see 9.5 [dcl.init]); otherwise, the subobject indicated by mem-initializer-id is
direct-initialized using expression-list as the initializer (see
9.5 [dcl.init]). ... The initialization
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 A 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:
of each base and member performed by
each mem-initializer constitutes a full-expression. Any
expression...
Date: 2026-07-27.15:54:01
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.5 [dcl.init]); otherwise, the subobject indicated
by mem-initializer-id is direct-initialized using
expression-list as the initializer (see 9.5 [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.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
| 2011-04-10 00:00:00 | admin | set | status: wp -> fdis |
| 2010-11-29 00:00:00 | admin | set | status: dr -> wp |
| 2010-08-23 00:00:00 | admin | set | messages: + msg2919 |
| 2010-08-23 00:00:00 | admin | set | status: ready -> dr |
| 2010-03-29 00:00:00 | admin | set | status: review -> ready |
| 2010-02-16 00:00:00 | admin | set | messages: + msg2551 |
| 2010-02-16 00:00:00 | admin | set | status: drafting -> review |
| 2008-10-05 00:00:00 | admin | set | messages: + msg1783 |
| 2008-10-05 00:00:00 | admin | set | status: review -> drafting |
| 2008-06-29 00:00:00 | admin | set | messages: + msg1685 |
| 2008-06-29 00:00:00 | admin | set | status: drafting -> review |
| 2008-03-17 00:00:00 | admin | set | status: open -> drafting |
| 2007-10-17 00:00:00 | admin | create | |