for (int i = 0; i < 10; ++i) /* something */;The papers
switch, and range-based
Grammatically, this is an init-statement, which allows expressions and variable declarations as well as typedefs, but (inconsistently) not alias-declarations. This paper proposes to also allow alias-declarations.
for (typedef int T; T e : v) /* something */;
for (using T = int; T e : v) /* something */;
The alternative would be to prohibit typedefs as an init-statement, but while unusual, they seem useful in some situations. After all, the argument of a reduced scope for variables introduced in an init-statement applies to typedefs as well.
#errorcheck seems weak, since the compiler error message for an unrecognized alias-declaration is unconditional and should be clear.
This has not been implemented.
init-statement: expression-statement simple-declaration