This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Namespace Lookup
Martin von Loewis writes:
>> It won't find static members of the class, for instance.
> OK. And were does it say so in the standard?
3.4.2 Argument-dependent name lookup [basic.lookup.koenig]
1 When an unqualified name is used as the postfix-expression in a func-
tion call (_expr.call_), other namespaces not considered during the
usual unqualified lookup (_basic.lookup.unqual_) may be searched, and
namespace-scope friend function declarations (_class.friend_) not oth-
erwise visible may be found.
Note that it only refers to namespace-scope friend functions (which
eliminates member functions)
> For example, in [over.match.oper], it says that operator lookup
> proceeds like Koenig lookup, except that members are not considered.
> [class.friend] says that friends are not members. So I wonder why
> they need to point out that members are omitted?
Good questions for comp.std.c++, indeed...
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil