Consider a program that has a class Foo containing a function Foo::fn declared like this:
virtual void fn();
and a subclass of Foo called Bar. Will declaring Bar::fn like this:
virtual void fn() override final;
reduce the size of the vtable in instances of Bar and instances of classes inheriting from Bar? If so, what is the simplest, most efficient method to define Bar::fn such that its functionality is exactly that of Foo::fn?
Aucun commentaire:
Enregistrer un commentaire