I'm working with C++14, and have a question regarding the use of the final specifier. If I declare a class as final, does this implicitly mean that all virtual methods within this class are also considered final? In other words, is it redundant to mark virtual methods as final in a class that's already marked as final?
Here's a basic example for clarification:
class MyClass
{
virtual void myMethod() {}
};
class ExampleClass final : public MyClass {
public:
void myMethod() final; // Is this 'final' redundant?
};
In this example, ExampleClass is a final class. My question is whether the final specifier for myMethod() is redundant, or if it has any specific effect.
I would appreciate any insights or references to the official C++ standard that clarify this.