g++, icc and clang accept following code :
namespace ns { struct A ; }
namespace ns1 // note : not enclosing namespace
{
using namespace ns ;
struct A { } ;
}
is this a valid code due to standard.?
[namespace.qual]#7: ... However, in such namespace member declarations, the nested-name-specifier may rely on using-directives to implicitly provide the initial part of the nested-name-specifier.
as noted in related answer,
you may omit the initial part of the nested-name-specifier, but not any intermediate part.
(from where i got that it can/must be done in enclosing namespace i do not remember.)