Created on 2013-05-05.00:00:00 last changed 36 months ago
Proposed resolution (November, 2016):
Change 220.127.116.11 [basic.start.static] paragraph 2 as follows, converting the bulleted list into running text as indicated:
A constant initializer for
anobject o is an expression thatis a constant expression, except that itmay also invoke constexpr constructors for o and its subobjects even if those objects are of non-literal class types. [Note: Such a class may have a non-trivial destructor —end note] Constant initialization is performed :
if each full-expression (including implicit conversions) that appears in the initializer of a reference with static or thread storage duration is a constant expression (7.7 [expr.const]) and the reference is bound to a glvalue designating an object with static storage duration, to a temporary object (see 6.7.7 [class.temporary]) or subobject thereof, or to a function;
anobject with static or thread storage duration is initialized by a constructor call, and if the initialization full-expression is aconstant initializer for the object;
if an object with static or thread storage duration is not initialized by a constructor call and if either the object is value-initialized or every full-expression that appears in its initializer is a constant expression.
If constant initialization is not performed...
Change 7.7 [expr.const] paragraph 2 as follows:
A conditional-expressione is a core constant expression unless...
[Adopted at the February/March, 2017 meeting.]
The resolution of issue 1489 added wording regarding value initialization to 18.104.22.168 [basic.start.static] paragraph 2 in an attempt to clarify the status of an example like
However, this example is aggregate initialization, not value initialization. Also, now that we allow brace-or-equal-initializers in aggregates, this wording also needs to be updated to allow an aggregate with constant non-static data member initializers to qualify for constant initialization.
|2018-02-27 00:00:00||admin||set||status: ready -> c++17|
|2017-02-06 00:00:00||admin||set||messages: + msg5714|
|2017-02-06 00:00:00||admin||set||status: drafting -> ready|
|2013-10-14 00:00:00||admin||set||status: open -> drafting|