C++ has virtual functions, where invoking one will at runtime look up the function address in a vtable.
C++ also has virtual bases. Accessing a data member of a virtual base will at runtime look up the offset the vtable.
Why does C++ lack virtual data members? Accessing one would look up the offset in the vtable as for a virtual base, but the data member would be provided by a derived
virtual void fun();
virtual int val;
void fun() override;
int val override;