These rules can in turn lead to the importation of yet more
translation units
. [
Note 6:
Such indirect importation does not make macros available,
because a translation unit is
a sequence of tokens in translation phase 7 (
[lex.phases])
. Macros can be made available by directly importing header units
as described in
[cpp.import]. —
end note]
A module implementation unit shall not be exported
. [
Example 1:
Translation unit #1:module M:Part;
Translation unit #2:export module M;
export import :Part;
— end example]
A module implementation unit of a module
M
that is not a module partition
shall not contain a
module-import-declaration
nominating
M. [
Example 2:
module M;
import M;
—
end example]
A translation unit has an
interface dependency on a translation unit
U
if it contains a declaration (possibly a
module-declaration)
that imports
U or if it has
an interface dependency on a translation unit that has an interface dependency on
U. A translation unit shall not have an interface dependency on itself
. [
Example 3:
Interface unit of M1:export module M1;
import M2;
Interface unit of M2:export module M2;
import M3;
Interface unit of M3:export module M3;
import M1; — end example]