AUTOSAR C++14 Rule A7-1-8
A non-type specifier shall be placed before a type specifier in a declaration
Since R2020a
Description
Rule Definition
A non-type specifier shall be placed before a type specifier in a declaration.
Rationale
Non-type specifiers include:
typedef
.friend
.constexpr
.register
.static
.extern
.thread-local
.mutable
.inline
.virtual
.explicit
.
To make the code more readable, place non-type specifiers before type specifiers in a declaration.
Polyspace Implementation
Polyspace® flags declarations that place non-type specifiers after a type specifier. If more than one non-type specifiers follow a type specifier, Polyspace flags the rightmost non-type specifier.
Troubleshooting
If you expect a rule violation but Polyspace does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Declaration |
Category: Required, Automated |
Version History
Introduced in R2020a