I know that in the aggregate class
Each element of the array or non-static member of the class in the index / appearance order of the array in the class definition is initialized with a copy from the corresponding sentence of the initializer list.
But my question is: can we use the previous initialized elements during initialization? How:
std::array<int, 2> d = { 3, d[0] };
or
int d[] = {3, d[0]};
Thanks!
c ++ arrays initialization c ++ 11
Bikineev
source share