Created on 2010-09-17.00:00:00 last changed 131 months ago
[Voted into the WP at the March, 2011 meeting as part of paper N3277.]
Proposed resolution (January, 2011):
Change 9.2.6 [dcl.constexpr] paragraph 3 as follows:
...
its function-body shall be = delete or a compound-statement of the form
{ return expression ; }...
Change 9.2.6 [dcl.constexpr] paragraph 4 as follows:
The definition of a constexpr constructorIn 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 it shall satisfy the following constraints:
each of its parameter types shall be a literal type or a reference to literal type;...
The current requirements for constexpr functions do not permit a deleted constexpr function because the definition does not consist of a compound-statement containing just a return statement. However, it could be useful to allow this form in a case where a single piece of code is used in multiple configurations, in some of which the function is constexpr and others deleted; having to update all declarations of the function to remove the constexpr specifier is unnecessarily onerous.
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: + msg3331 |
2011-04-10 00:00:00 | admin | set | status: tentatively ready -> fdis |
2011-02-28 00:00:00 | admin | set | messages: + msg3228 |
2011-02-28 00:00:00 | admin | set | status: drafting -> tentatively ready |
2010-11-29 00:00:00 | admin | set | status: open -> drafting |
2010-09-17 00:00:00 | admin | create |