Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++Multiple inheritance layoutSingle-choice MCQ

A `C*` pointing at the second non-virtual polymorphic base is converted back to the most-derived `C*` via a method's `this` adjustment. How does a call through the second base's vtable reach the correct `this`?

struct P1 { virtual void f(); }; struct P2 { virtual void g(); }; struct C : P1, P2 { void g() override; };