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

A class D multiply-inherits from two polymorphic bases B1 and B2, each with its own virtual function. How many vptrs does a D object hold under Itanium, and what is special about the secondary one?

struct B1 { virtual void f1(); }; struct B2 { virtual void f2(); }; struct D : B1, B2 { void f1() override; void f2() override; };