Skip to content

Rule: Class gained a vtable pointer

Canonical rule slug: class-gained-vtable-pointer. ← back to all rules

A non-polymorphic class gains its first virtual member, so the compiler inserts a vtable pointer and every data member's offset shifts by a pointer width.

Canonical demonstration