§3.4.1/9 in the C++11 Standard says:
Name lookup for a name used in the definition of a friend function (11.3) defined inline in the class granting friendship shall proceed as described for lookup in member function definitions. If the friend function is not defined in the class granting friendship, name lookup in the friend function definition shall proceed as described for lookup in namespace member function definitions.
My interpretation of this paragraph is that friend functions defined in the class granting friendship follow the rules in the previous paragraph (3.4.1/8). But what about the next case, i.e., where the friend function is not defined in the class granting friendship? What is this, so called lookup in namespace function definition? Would that be paragraph 6? I'm not sure.