Does a C++ namespace alias defined inside a function definition have a block, function, file, or other scope (duration of validity)?
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