
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
46 lines
704 B
Plaintext
46 lines
704 B
Plaintext
== Why is this an issue?
|
|
|
|
The use of C headers and therefore C functions in a {cpp} program, is sometimes necessary, but should be avoided in favor of {cpp} headers and functions.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,cpp]
|
|
----
|
|
#include <string.h>
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,cpp]
|
|
----
|
|
#include <cstring>
|
|
#include <string>
|
|
----
|
|
|
|
|
|
== Resources
|
|
|
|
* MISRA {cpp}:2008, 18-0-1 - The C library shall not be used.
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Use the equivalent {cpp} header instead of XXX
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== is duplicated by: S1770
|
|
|
|
endif::env-github,rspecator-view[]
|