Created on 2010-09-04.00:00:00 last changed 130 months ago
[Voted into the WP at the March, 2011 meeting as part of paper N3277.]
Proposed resolution (November. 2010):
Change 9.2.6 [dcl.constexpr] paragraph 1 as follows:
The constexpr specifier shall be applied only to the definition ofan objecta variable, the declaration of a function...
Change 9.2.6 [dcl.constexpr] paragraph 8 as follows:
A constexpr specifier used in an object declaration declares the object as const. Such an object shall be initialized. If it is initialized by a constructor call, the constructor shall be a constexpr constructor and every argument to the constructor shall be a constant expression. Otherwise, or if a constexpr specifier is used in a reference declaration, every full-expression that appears in its initializer shall be a constant expression...
9.2.6 [dcl.constexpr] restricts the constexpr specifier to object and function declarations. Especially given the support for reference types in constexpr functions, and considering that constexpr pointer declarations are permitted, there does not seem to be a good reason for excluding constexpr references.
(See also issue 1195.)
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: + msg3329 |
2011-04-10 00:00:00 | admin | set | status: review -> fdis |
2010-11-29 00:00:00 | admin | set | messages: + msg3084 |
2010-11-29 00:00:00 | admin | set | status: open -> review |
2010-09-04 00:00:00 | admin | create |