Are you sure A10-3-3 requires functions to be marked "final"? We've seen before that sometimes the examples do not match (or even contradict) the rule text (e.g. A3-1-5).
A10-3-3 says: "Virtual functions shall not be introduced in a final class".
Some definitions of introduce that I can find:
"to put something into use, operation, or a place for the first time" (link)
"to mention something for the first time in a piece of writing" (link)
In my view, adding an override function in a Derived class is not introducing a virtual function, since it's not the first time it appears (it did in the Base class).
Going to the original source, HIC v4.0 Rule 9.1.5, the rule is clear - do not add new virtual functions in a final class, since there won't be any further derived classes that can benefit from it.
Otherwise, A10-3-2 has no purpose at all, right?
A10-3-3 says: "Virtual functions shall not be introduced in a final class".
Some definitions of introduce that I can find:
"to put something into use, operation, or a place for the first time" (link)
"to mention something for the first time in a piece of writing" (link)
In my view, adding an override function in a Derived class is not introducing a virtual function, since it's not the first time it appears (it did in the Base class).
Going to the original source, HIC v4.0 Rule 9.1.5, the rule is clear - do not add new virtual functions in a final class, since there won't be any further derived classes that can benefit from it.
Code:
class Base
{
public:
virtual void f1();
};
class Derived final : public Base
{
public:
virtual void f2(); // Do not introduce a new virtual function!
}
Otherwise, A10-3-2 has no purpose at all, right?