What is the scope of a namespace alias?

c++, namespace-alias, namespaces, scope

Solution

It's a block duration of validity.

For example: If you define a namespace alias as below, the namespace alias abc would be invalid outside the `{...}`-block.

{  
    namespace abc = xyz;
    abc::test t;  //valid 
}
abc::test t;  //invalid

Problem

Does a C++ namespace alias defined inside a function definition have a block, function, file, or other scope (duration of validity)?

Original source