The order how you specify in the member initializer list doesn't matter, non-static members are initialized in order of declaration in the class definition.
The order of member initializers in the list is irrelevant: the actual order of initialization is as follows:
3) Then, non-static data members are initialized in order of declaration in the class definition.
That means _b2
will always be initialized before _b
; and when _b
is used to initialize _b2
it's still not initialized.
BTW: The similar rule is applied for the initializations of direct base classes.
2) Then, direct base classes are initialized in left-to-right order as they appear in this class's base-specifier list