Proposed resolution (February, 2012):
Change 6.5.4 [basic.lookup.argdep] paragraph 1 as follows:
...in those namespaces, namespace-scope friend function or function template declarations (11.3) not otherwise visible may be found...
Change _N4868_.9.8.2.3 [namespace.memdef] paragraph 3 as follows:
Every name first declared in a namespace is a member of that namespace. If a friend declaration in a non-local class first declares a class,orfunction, class template, or function template95 the friendclass or functionis a member of the innermost enclosing namespace. The name of the friend is not found by unqualified lookup (6.5.3 [basic.lookup.unqual]) or by qualified lookup (6.5.5 [basic.lookup.qual]) until a matching declaration is provided in that namespace scope (either before or after the class definition granting friendship). If a friend function or function template is called, its name may be found by the name lookup that considers functions from namespaces and classes associated with the types of the function arguments (6.5.4 [basic.lookup.argdep]). If the name in a friend declaration...