Linkage in Names with File Scope

The following linkage rules apply to names (other than typedef and enumerator names) with file scope:

If a name is explicitly declared as static, it has internal linkage and identifies a program element inside its own translation unit.

If a function name with file scope is explicitly declared as inline, it has external linkage (Microsoft specific).

If a name is declared as const but not as extern, the name still has external linkage (Microsoft specific).

A class has internal linkage if it meets these criteria (Microsoft specific):

Uses no C++ functionality (for example, member-access control, member functions, constructors, destructors, and so on).

Not used in the declaration of another name that has external linkage. This constraint means that objects of class type that are passed to functions with external linkage cause the class to have external linkage.

Enumerator names and typedef names have no linkage.

All other names with file scope have external linkage.