AutosarC++18_10-M17.0.2¶
The names of standard library macros and objects shall not be reused
Required inputs: IR
| Level | required |
|---|---|
| Target | implementation |
| Enforcement | automated |
Rationale
Where the developer uses new versions of standard library macros or objects (e.g. to enhance functionality or add checks of input values), the modified macro or object shall have a new name.
This is to avoid any confusion as to whether a standard macro or object, or a modified version of them, is being used.
Example
#define NULL ( a > b ) // Non-compliant
Note
For legal reasons, this rule’s description is not part of the public documentation.