Place const
as the rightmost declaration specifier when declaring constants. Although placing const
to the right of the type specifier in declarations conflicts with conventional usage, it is less likely to result in common errors and should be the preferred approach.
Non-Compliant Code Example
Unable to render {include} The included page could not be found.
Compliant Solution
Unable to render {include} The included page could not be found.
Exceptions
Placing const
to the left of the type name may be appropriate to preserve consistency with existing code.
References
- ISO/IEC 9899-1999 Section 6.7, "Declarations"
- Saks 99