Defining namespaces (C++ only)

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

Read syntax diagramSkip visual syntax diagram
Namespace syntax

>>-+------------+--namespace--+------------+-------------------->
   |        (1) |             '-identifier-'   
   '-inline-----'                              

>--{--namespace_body--}----------------------------------------><

Notes:
  1. This syntax is valid only at the C++11 language level.

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.