Created on 2013-08-08.00:00:00 last changed 122 months ago
[Moved to DR at the February, 2014 meeting.]
Proposed resolution (January, 2014):
Change 8.5 [stmt.select] paragraph 2 as follows:
The rules for conditions apply both to selection-statements and to the for and while statements (8.6 [stmt.iter]). The declarator shall not specify a function or an array. The decl-specifier-seq shall not define a class or enumeration. If the auto type-specifier appears in the decl-specifier-seq, the type of the identifier being declared is deduced from the initializer as described in 9.2.9.7 [dcl.spec.auto].
Change 8.6.5 [stmt.ranged] paragraph 2 as follows:
In the decl-specifier-seq of a for-range-declaration, each decl-specifier shall be either a type-specifier or constexpr. The decl-specifier-seq shall not define a class or enumeration.
The interaction of various issue resolutions has inadvertently resulted in the loss of the prohibition of defining types in conditions (8.5 [stmt.select] paragraph 1) and in a range-based for (8.6 [stmt.iter] paragraph 1). Issue 686 addressed a patchwork of restrictions by banning type definitions in type-specifier-seqs. Issue 948 then changed the definition of condition to use a decl-specifier-seq instead of a type-specifier-seq in order to permit the constexpr specifier. A similar change was made for range-based for statements by issue 1204.
The restrictions against type definitions in these contexts should be restored.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-11-24 00:00:00 | admin | set | status: dr -> c++14 |
2014-03-03 00:00:00 | admin | set | messages: + msg4945 |
2014-03-03 00:00:00 | admin | set | status: tentatively ready -> dr |
2014-01-20 00:00:00 | admin | set | messages: + msg4725 |
2014-01-20 00:00:00 | admin | set | status: drafting -> tentatively ready |
2013-10-14 00:00:00 | admin | set | status: open -> drafting |
2013-08-08 00:00:00 | admin | create |