Date
2009-09-15.00:00:00
Message id
2290

Content

Proposed resolution (September, 2009):

Change 6.5.4 [basic.lookup.argdep] paragraph 1 as follows:

When an unqualified name is used as the postfix-expression in a function call (7.6.1.3 [expr.call]) is an unqualified-id, other namespaces not considered during the usual unqualified lookup (6.5.3 [basic.lookup.unqual]) may be searched, and in those namespaces, namespace- scope friend function declarations (11.8.4 [class.friend]) not otherwise visible may be found. These modifications to the search depend on the types of the arguments (and for template template arguments, the namespace of the template argument). [Example:

    namespace N {
      struct S { };
      void f(S);
    }

    void g() {
      N::S s;
      f(s);      // calls N::f
      (f)(s);    // error: N::f not considered; parentheses prevent argument-dependent lookup
    }

end example]