Although a variable is considered defined during its own initialization, it is still illegal to evaluate its unit, its initialization is complete. This is why Type b = b is undefined behavior.
The reason the variable is even defined is because you can do this:
struct X { int *p; int a; }; X x = {&x.a, 123}; cout << *xp << endl;
The use of a variable initialized for purposes other than one's own assessment is legal. In the above example, the initializer x must be able to refer to x in order to calculate the address of its member a . This is legal because a itself is not evaluated ( demonstration ).
source share