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


2820. Value-initialization and default constructors

Section: 9.4.1  [dcl.init.general]     Status: DRWP     Submitter: Shafik Yaghmour     Date: 2023-10-31

[Accepted as a DR at the March, 2024 meeting.]

Subclause 9.4.1 [dcl.init.general] paragraph 9 specifies:

To value-initialize an object of type T means:

The specification about checking the semantic constraints and invoking only non-trivial default constructors is overly convoluted. Omitting a call to a trivial constructor is an as-if optimization that should not be prescribed by the standard.

Proposed resolution (approved by CWG 2024-01-19):

Change in 9.4.1 [dcl.init.general] bullet 9.1.2 as follows: