== Why is this an issue?

There is no need to use the ``++final++`` specifier inside a ``++final++`` class. Everything in it is ``++final++`` by default.


Similarly, there is no need to use the ``++final++`` specifier for ``++union++``, because ``++union++``s can neither extend other classes nor be extended.

=== Noncompliant code example

[source,cpp]
----
class Base {
  virtual void fun();
};

class Derived final : Base {
  void fun() final;  // Noncompliant
};

union MyUnion final { // Noncompliant
  // ...
};
----

=== Compliant solution

[source,cpp]
----
class Base {
  virtual void fun();
};

class Derived final : Base {
  void fun() override;
};

union MyUnion {
  // ...
};
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Replace this "final" specifier by "override".

Remove this "final" specifier.


include::../highlighting.adoc[]

'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]

endif::env-github,rspecator-view[]
