I have code as below
struct A {int i; int j;}
int main()
{
array<A, 2> a;
a = {{1,2},{3,4}}; //compilation error: not take a right-hand operand of
//type 'initializer list' (or no acceptable conversion)
}
I think it is a nested aggregate initialization, but why not work? And How to make a = {{1,2},{3,4}}
work by changing the code?
Find way work
a = { {{1,2},{3,4}} };
Don't know why?