- Construction always starts with the base
class. If there are multiple baseclasses then, construction starts with the left most base. (side note: If there is avirtualinheritance then it’s given higher preference). - Then the member fields are constructed. They are initialized in the
order they are declared - Finally, the
classitself is constructed - The order of the destructor is exactly the reverse
Irrespective of the initializer list, the call order will be like this:
- Base
class A‘s constructor class B‘s field nameda(of typeclass A) will be constructed- Derived
class B‘s constructor