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


2424. constexpr initialization requirements for variant members

Section: 9.2.6  [dcl.constexpr]     Status: C++20     Submitter: Richard Smith     Date: 2019-08-03

[Adopted as a DR at the November, 2019 meeting.]

Paper P1331R2 removed the requirement that a constexpr constructor initialize every non-variant non-static data member, but it left untouched the corresponding requirements for variant members. That is, the modified text in 9.2.6 [dcl.constexpr] paragraph 4 still contains:

The definition of a constexpr constructor whose function-body is not = delete shall additionally satisfy the following requirements:

Presumably this was an oversight and these two bullets should be changed from “exactly” to “at most” or something similar.

Proposed resolution (September, 2019):

Delete the indcated text from 9.2.6 [dcl.constexpr] paragraph 4:

The definition of a constexpr constructor whose function-body is not = delete shall additionally satisfy the following requirements: