Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++Vtable and vptr layoutSingle-choice MCQ

An object of a polymorphic class is copy-assigned from another object of the SAME class (`a = b;` via the implicitly-defined copy assignment). What happens to the target object's vptr?

struct B { virtual void f(); int x; }; B a, b; a = b; // implicit copy assignment