where did you find this source from?
can you give me the link?
and just to get my self right, what you understand from "the order of the ancestors listing in the class definition ", is something like this right?
class Bat : public Mammal, public WingedAnimal {};
or
class Bat : public WingedAnimal, public Mammal {};
right?
Main Topics
Browse All Topics





by: Let_Me_BePosted on 2009-11-03 at 13:33:52ID: 25734014
12.6.2 par 5
Initialization shall proceed in the following order:
First, and only for the constructor of the most derived class as described below, virtual base classes shall
be initialized in the order they appear on a depth-first left-to-right traversal of the directed acyclic graph
of base classes, where left-to-right is the order of appearance of the base class names in the derived
class base-specifier-list.
Then, direct base classes shall be initialized in declaration order as they appear in the base-specifier-list
(regardless of the order of the mem-initializers).
Then, nonstatic data members shall be initialized in the order they were declared in the class definition
(again regardless of the order of the mem-initializers).
Finally, the body of the constructor is executed.
[Note: the declaration order is mandated to ensure that base and member subobjects are destroyed in the
reverse order of initialization. ]