[basic.namespace.general] (original) (raw)
9 Declarations [dcl]
9.9 Namespaces [basic.namespace]
9.9.1 General [basic.namespace.general]
A namespace is an optionally-named entity whose scope can contain declarations of any kind of entity.
The name of a namespace can be used to access entities that belong to that namespace; that is, the members of the namespace.
Unlike other entities, the definition of a namespace can be split over several parts of one or more translation units and modules.
[Note 1:
A namespace is never attached to a named module and never has a name with module linkage.
— _end note_]
[Example 1: export module M;namespace N1 {} // N1 is not exported export namespace N2 {} // N2 is exported namespace N3 { export int n; } // N3 is exported — _end example_]
The global namespace belongs to the global scope; it is not an unnamed namespace ([namespace.unnamed]).
[Note 2:
Lacking a declaration, it cannot be found by name lookup.
— _end note_]