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


1749. Confusing definition for constant initializer

Section: 6.9.3.2  [basic.start.static]     Status: NAD     Submitter: Daniel Krügler     Date: 2013-09-12

According to 6.9.3.2 [basic.start.static] paragraph 2,

A constant initializer for an object o is an expression that is a constant expression, except that it may 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].

This would be clearer if worded as something like,

A constant initializer for an object o is an expression that would be a constant expression if every constexpr constructor invoked for o and its subobjects were a constructor for a literal class type.

Rationale (February, 2014):

CWG felt that the existing wording is clear enough.