35 lines
448 B
Plaintext
35 lines
448 B
Plaintext
Redundant forward declarations simply clutter the code, and like any duplications, should be removed.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,cpp]
|
|
----
|
|
struct S {
|
|
// ...
|
|
};
|
|
// ...
|
|
struct S; // Noncompliant
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,cpp]
|
|
----
|
|
struct S {
|
|
// ...
|
|
};
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|