It's example of rhomboid inheritance. It means that in order to create object of final class from two that are derivative to some base class we need to create 2 objects of base (constructors are placed in order base obj1, der1 obj.,base obj2, der2.obj) class one for each derivative and then create object of final class, so we have DADCB (note: class A constructor appears earlier then class C one, because it's defined earlier then C), destructors appear in reversed order, so we have DADCB~B~C~D~A~D.
Войдите чтобы поставить Нравится
Войдите чтобы прокомментировать