The C++ standards define some identifiers as having special meaning in specific contexts. These are:
-
final
and override
since C++11
-
module
and import
since C++20
While it is technically possible to use them as normal identifiers, it’s clearer for the reader of the code to consider them as if they were
keywords and only use them with their special meaning.
Noncompliant code example
void module(int final); // Noncompliant
Compliant solution
void precept(int finalValue); // Compliant