Is there any sense in marking a base class function as both virtual and final? [duplicate]
This question already has an answer here: What's the point of a final virtual function? 10 answers In various explanations of C++11's final keyword, I'm seeing examples like this. class base { public: virtual void f() final; }; class derived : public base { public: virtual void f(); // Illegal due to base::f() declared final. }; Is this actually a useful use of final ? Why would you declare a virtual function in a base class (implying that it will be usefully overrideable in derived classes) and then immediately mark it as final (negating that implication)? What is the utility of virtual void