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

Under the Itanium ABI, what is the memory layout consequence of this diamond when `B` and `C` virtually inherit from `A`, and how is the shared `A` subobject located at runtime?

struct A { int a; }; struct B : virtual A { int b; }; struct C : virtual A { int c; }; struct D : B, C { int d; };