This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Voted into the WP at the March, 2011 meeting as part of paper N3262.]
It seems unfortunate that the beginning of a C-style for loop can look like
whereas the beginning of a range-based for loop looks like
So that we don't know what constraints we are trying to apply to the specifiers until we see, or don't see, a :. The inconsistency between decl-specifier-seq and type-specifier-seq seems gratuitous and inconvenient.
Proposed resolution (November, 2010) [SUPERSEDED]:
Change the grammar 8.6 [stmt.iter] paragraph 1 as follows:
Add the following as a new paragraph at the end of 8.6.5 [stmt.ranged]:
The the decl-specifier-seq of a for-range-declaration, each decl-specifier shall be either a type-specifier or constexpr.