Module Linkage

Learn the difference between internal and external linkages with examples.

We'll cover the following...

Before C++20

Until C++20, C++ supported two kinds of linkages: internal linkages and external linkages.

  • Internal linkage: Names with internal linkage are not accessible outside the translation unit. The internal linkage includes mainly namespace-scope names that are declared static and members of anonymous namespaces.

  • External linkage: Names with external linkage are accessible ...