Since ``++final++`` classes can't be extended, indicating that functions in such a class are overrideable by adding the ``++virtual++`` specifier is possibly misguided, and definitely confusing.


== Noncompliant Code Example

----
class Base {
  virtual void f1();
};

class C final : Base {
  virtual void f1();  // Noncompliant
  virtual void f2();  // Noncompliant
};
----


== Compliant Solution

----
class Base {
  virtual void f1();
};

class C final : Base {
  void f1() override;
  void f2();
};
----


== See

* S3471 - "override" or "final" should be used instead of "virtual"



ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
