Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++multiple and virtual inheritance layoutSingle-choice MCQ

In the diamond below using *virtual* inheritance, a `Top` subobject is shared. Under the Itanium ABI, how does a member function of `Bottom` (or code holding a `Left*`) locate the single shared `Top` subobject at runtime?

struct Top { int t; virtual void v(); }; struct Left : virtual Top {}; struct Right : virtual Top {}; struct Bottom: Left, Right {};