Virtual function efficiency and the 'final' keyword
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; cause calls to fn in Bar or subclasses of Bar to be any more efficient, or will it just keep subclasses of Bar from overriding fn ? If calls are made more efficient using final , what is the simplest, most efficient method to define Bar::fn such that its functionality is exactly that of Foo::fn ? If fn is defined as final in Bar , the compiler can dispatch calls to fn through a pointer