Namespaces
Isolating functions and types
Namespaces provide a way to encapsulate and group multiple similar types together. They also allow for multiple types in different namespaces to be named the same without interfering with each other.
To access a type within a namespace, the scope resolution operator ::
is used. In the example above, to access the type Type
inside the namespace abc
, abc::Type
is used.
Last updated