Поделиться через


namespace Alias

A namespace alias is an alternative name for a namespace.

namespace identifier = [::] [nested-name-specifier] namespace-name;

Remarks

A namespace alias definition declares an alternate name for a namespace. The identifier is a synonym for the specified namespace and becomes a namespace alias. For example:

namespace a_very_long_namespace_name { ... }
namespace AVLNN = a_very_long_namespace_name;
// AVLNN is now a namespace-alias for a_very_long_namespace_name.

A namespace name or alias must be different from all other identifiers in its declarative region. A global namespace name or alias must be different from all other global entity names in the program.

See Also

Reference

Namespaces (C++)