This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-10-26
[Voted into the WP at the March, 2011 meeting.]
Issue 1199 proposes to add the capability of defining a constexpr special function as deleted. It would be similarly useful to be able to mark a defaulted constructor as constexpr. (It should be noted that the existing text of 11.4.5 [class.ctor] and the proposed resolution of issue 1224 already allow for implicitly-defined constructors to be implicitly constexpr; this issue simply proposes allowing the explicit use of the constexpr specifier.)
Proposed resolution (February, 2011):
Change 9.2.6 [dcl.constexpr] paragraph 3 as follows:
...
its function-body shall be = delete, = default, or a compound-statement of the form
{ return expression ; }...
Change 9.2.6 [dcl.constexpr] paragraph 4 as follows:
In the definition of a constexpr constructor, each of the parameter types shall be a literal type or a reference to a literal type. In addition, either its function-body shall be = delete or = default or it shall satisfy the following constraints:
...
A trivial copy/move constructor is also a constexpr constructor.