rspec/rules/S1669/cfamily/rule.adoc

19 lines
561 B
Plaintext
Raw Normal View History

The {cpp} standards define some identifiers as having special meaning in specific contexts. These are:
* ``++final++`` and ``++override++`` since {cpp}11
* ``++module++`` and ``++import++`` since {cpp}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.
2020-06-30 12:47:33 +02:00
== Noncompliant Code Example
----
void module(int final); // Noncompliant
2020-06-30 12:47:33 +02:00
----
== Compliant Solution
----
void precept(int finalValue); // Compliant
----