Created on 2011-02-02.00:00:00 last changed 131 months ago
[Voted into the WP at the March, 2011 meeting.]
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.
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.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
2011-04-10 00:00:00 | admin | set | messages: + msg3340 |
2011-04-10 00:00:00 | admin | set | status: tentatively ready -> fdis |
2011-02-28 00:00:00 | admin | set | messages: + msg3230 |
2011-02-02 00:00:00 | admin | create |