2 ms·
It's "aggregate initialization" [0] struct S { int x; struct Foo { int i; int j; int a[3]; } b; }; S s1 =
by Game_Ender 8y ago
It's "aggregate initialization" [0]
struct S {
int x;
struct Foo {
int i;
int j;
int a[3];
} b;
};
S s1 = { 1, { 2, 3, {4, 5, 6} } };
0 - https://en.cppreference.com/w/cpp/language/aggregate_initialization https://en.cppreference.com/w/cpp/language/aggregate_initial...
- planteen 8y agoI don't think that is what is going on, this is invoking the constructor for the weekday class with the "modern" uniform initilization syntax. This solves the old C++ most vexing parse problem. https://en.wikipedia.org/wiki/Most_vexing_parse https://en.wikipedia.org/wiki/Most_vexing_parse It seems like this is the C++ class in question: https://howardhinnant.github.io/date/iso_week.html https://howardhinnant.github.io/date/iso_week.html