You can inject a friend declaration into a namespace by declaring it within an enclosed class:
//: C10:FriendInjection.cpp namespace Me { class Us { //... friend void you(); }; } int main() {} ///:~
Now the function you( ) is a member of the namespace Me.
If you introduce a friend within a class in the global namespace, the friend is injected globally.