C ++ element initialization order in an aggregated class

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!

+7
c ++ arrays initialization c ++ 11
source share

No one has answered this question yet.

See similar questions:

thirty
Can an array initialization reference (C / C ++) by itself?

or similar:

8499
What is the "->" operator in C ++?
7494
How to remove a specific element from an array in JavaScript?
4247
The ultimate guide and list of books in C ++
3076
What are the differences between a pointer variable and a reference variable in C ++?
2583
One line array initialization
2335
Removing an element from an array in PHP
1994
What are the basic rules and idioms for operator overloading?
1783
C ++ 11 introduced a standardized memory model. What does it mean? And how will this affect C ++ programming?
778
Java Efficiency "Double Brace Initialization"?
385
Static constant string (class member)

All Articles