24 lines
261 B
Plaintext
24 lines
261 B
Plaintext
Redundant forward declarations simply clutter the code, and like any duplications, should be removed.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
struct S {
|
|
// ...
|
|
};
|
|
// ...
|
|
struct S; // Noncompliant
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
struct S {
|
|
// ...
|
|
};
|
|
----
|
|
|
|
|