Objects or functions with external linkage shall be declared in a header file
Objects or functions with external linkage shall be declared in a header file.
If you declare a function or object in a header file, it is clear that the
function or object is meant to be accessed in multiple translation units. If you
intend to access the function or object from a single translation unit, declare it
static or in an unnamed namespace.
If you expect a rule violation but do not see it, refer to Coding Standard Violations Not Displayed.
| Group: Basic Concepts |
| Category: Required |