This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-12-19


2674. Prohibit explicit object parameters for constructors

Section: 11.4.5.1  [class.ctor.general]     Status: C++23     Submitter: Erich Keane     Date: 2022-01-11

[Accepted at the February, 2023 meeting.]

Constructors are not intended to have explicit object parameters, but the standard is missing a corresponding prohibition.

Proposed resolution (approved by CWG 2023-01-06):

Add a new paragraph after 11.4.5.1 [class.ctor.general] paragraph 7 as follows:

A constructor shall not be a coroutine.

A constructor shall not have an explicit object parameter (9.3.4.6 [dcl.fct]).