There's a clause I was never sure I understood the point of but I think it exists to forbid the following initialization:
int main(void) {
int x = ( (x = 1), 2);
}
There's a clause I was never sure I understood the point of but I think it exists to forbid the following initialization:
int main(void) {
int x = ( (x = 1), 2);
}
@void_friend I don't think that's what it's doing at all. Those are not "providing a value for an object" but simply assignment expressions. Rather, the confusing clause is related to how iteration of the current object/next subobject works when braces are misleading.
For example you can initialize
struct foo {
int x[2];
int y;
}
with { {1, 2}, 3 } or { 1, 2, 3 }
but not with { {1, 2, 3} }.