The difference between a scope and a namespace is that a scope is an anonymous namespace.
Namespaces may be referred to, and they have a distinct type.
The : and :: operators are used for explicitly specifying which namespace is to be searched for an identifier. The : operator can be overloaded to return an ordered set of namespaces in which to search.
The global scope can be explicitly accessed by treating the : and :: operators as unary prefix operators, similar to in C++.
All scopes have user-specified access rights that indicate which other scopes can see the contents of that scope.
The difference between a scope and a namespace is that a scope is an anonymous namespace.
Namespaces may be referred to, and they have a distinct type.
The
:
and::
operators are used for explicitly specifying which namespace is to be searched for an identifier. The:
operator can be overloaded to return an ordered set of namespaces in which to search.The global scope can be explicitly accessed by treating the
:
and::
operators as unary prefix operators, similar to in C++.All scopes have user-specified access rights that indicate which other scopes can see the contents of that scope.