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


2612. Incorrect comment in example

Section: 9.4.1  [dcl.init.general]     Status: C++23     Submitter: Jiang An     Date: 2022-05-24

[Accepted as a DR at the November, 2022 meeting.]

Subclause 9.4.1 [dcl.init.general] bullet 16.6.1 says:

[Example 2: T x = T(T(T())); calls the T default constructor to initialize x. —end example]

This is incorrect; in some situations, the default constructor is not invoked (see 9.4.1 [dcl.init.general] paragraph 9).

Proposed resolution (approved by CWG 2022-08-26):

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

[Example 2: T x = T(T(T())); calls the T default constructor to initialize value-initializes x. —end example]