rspec/rules/S1669/cfamily/rule.adoc

34 lines
816 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
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]