Full name of submitter (unless configured in github; will be published with the issue): Jakub Jelinek
Reference (section label): [basic.scope.block]
Link to reflector thread (if any):
Issue description:
P1306R5 added expansion statement next to iteration statement in https://eel.is/c++draft/basic.scope.block#1.1 but has not done the same in https://eel.is/c++draft/basic.scope.block#2.2
I think it would be really surprising if
template for (auto g : whatever) {
int g = 42;
}
was valid while
for (auto g : whatever) {
int g = 42;
}
is not.
Suggested resolution:
Change
"substatement of a selection or iteration statement that is not itself a selection or iteration statement, or"
to
"substatement of a selection, iteration or expansion statement that is not itself a selection, iteration or expansion statement, or"