Looking at C++ Templates: The Complete Guide (2nd Edition)/official site this morning I came across a section I can\'t quite make sense out of (12.5.2 if you have the book).
The book is right. [temp.friend]p1 - with the relevant part highlighted:
For a friend function declaration that is not a template declaration:
if the name of the friend is a qualified or unqualified template-id, [...]
if the name of the friend is a qualified-id and a matching non-template function is found in the specified class or namespace, [...]
if the name of the friend is a qualified-id and a matching function template is found in the specified class or namespace, the friend declaration refers to the deduced specialization of that function template
[...]