External linkage
In global scope, identifiers for the following kinds of
entities declared without the static storage class
specifier have external linkage:
- An object
- A function
In namespace scope, the identifiers
for the following kinds of entities have external linkage:
- A reference or an object that does not have internal linkage
- A function that does not have internal linkage
- A named class or enumeration
- An unnamed class or enumeration defined in a typedef declaration
- An enumerator of an enumeration that has external linkage
- A template, unless it is a function template with internal linkage
- A namespace, unless it is declared in an unnamed namespace
If the identifier for a class has external linkage, then,
in the implementation of that class, the identifiers for the following
entities will also have external linkage:
- A member function
- A static data member
- A class of class scope
- An enumeration of class scope