If a function declared in global namespace returns value of class or enum type, there is apparent ambiguity if this function is declared as a friend of some class defined in a namespace. See example:
class A {};
A func();
namespace N {
class C {
friend A :: func();
};
}
gcc, cland and icc all reject the friend function declaration, because the try to interpret 'A::' as a nested name specifier. It would however be a valid code if '::' were treated as a global scope specifier in function declarator.
Is there anything in the Standard that prescribes such interpretation?