Created on 2010-08-02.00:00:00 last changed 131 months ago
[Voted into the WP at the March, 2011 meeting as part of paper N3262.]
Proposed resolution (November, 2010):
Change 11.4.9.3 [class.static.data] paragraph 3 as follows:
If a non-volatile const static data member is ofconst literalintegral or enumeration type, its declaration in the class definition can specify a brace-or-equal-initializer in which every initializer-clause that is an assignment-expression is a constant expression (7.7 [expr.const]). A static data member of literal type can be declared in the class definition with the constexpr specifier...
According to 11.4.9.3 [class.static.data] paragraph 3,
If a static data member is of const literal type, its declaration in the class definition can specify a brace-or-equal-initializer in which every initializer-clause that is an assignment-expression is a constant expression. A static data member of literal type can be declared in the class definition with the constexpr specifier; if so, its declaration shall specify a brace-or-equal-initializer in which every initializer-clause that is an assignment-expression is a constant expression. [Note: In both these cases, the member may appear in constant expressions. —end note]
However, 7.7 [expr.const] bullet 2.7 allows only integral and enumeration types in constant expressions for the const case; the other types require constexpr to be considered constant expressions.
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: + msg3359 |
2011-04-10 00:00:00 | admin | set | status: review -> fdis |
2010-11-29 00:00:00 | admin | set | messages: + msg3097 |
2010-11-29 00:00:00 | admin | set | status: open -> review |
2010-08-02 00:00:00 | admin | create |