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


892. Missing requirements for constexpr constructors

Section: 9.2.6  [dcl.constexpr]     Status: C++11     Submitter: Alisdair Meredith     Date: 8 May, 2009

[Voted into WP at August, 2010 meeting.]

The rules for constexpr constructors are missing some necessary requirements. In particular, there is no requirement that a brace-or-equal-initializer for a non-static data member be a constant expression, and the requirement for constexpr constructors for initializing non-static data members applies only to members named in a mem-initializer, allowing a non-constexpr default constructor to be invoked.

Proposed resolution (February, 2010):

Change 9.2.6 [dcl.constexpr] paragraph 4 as follows:

The definition of a constexpr constructor shall satisfy the following constraints: