Defining namespaces (C++ only)

In order to uniquely identify a namespace, use the namespace keyword.

Read syntax diagramSkip visual syntax diagramNamespace syntax
 
>>-namespace--+------------+--{--namespace_body--}-------------><
              '-identifier-'
 

The identifier in an original namespace definition is the name of the namespace. The identifier may not be previously defined in the declarative region in which the original namespace definition appears, except in the case of extending namespace. If an identifier is not used, the namespace is an unnamed namespace.

Related information