Hello mates!I have a question about the well known problem of diamond inheritance. I have a base class,two derived classes of this base class (let's say d1,d2) which both inherit from the base and a last class which inherits from the two derived class(lets say "last").
With the use of virtual inheritance i can solve the diamond problem and if i create a "last" object the compiler will not call twice a function of class "base".But i wonder which is the criterion the compiler will use one path instead of an other. For example why last->d1->base and not last->d2->base?
Should i concern why the compiler choose one specific path,or it doesn't have any value at all?
If you have virtual inheritance, it doesn't matter what the path is because there's only 1 base. last->d1->base and last->d2->base are exactly the same.