This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Namespace Lookup


Martin von Loewis writes:

>> There are no namespaces involved in this example, nor in your other
>> example, so the Koenig rules do not kick in.  This are resolved using
>> the normal unqualified name lookup rules as far as I understand the
>> standard (but I only have the Dec'96 draft so things may have changed).

> I'm afraid I can't agree. First, Koenig lookup always applies to
> function calls where the postfix expression is an unqualified name.

Correct.

> I'm not sure what the lookup in the associated classes is supposed
> to do. For one thing, it is certainly meant to include all friends
> into Koenig lookup, even if they are not in the associated
> namespaces.

That's exactly what Koenig lookup in classes is supposed to do.

> I'm not sure what else would be found.

It won't find static members of the class, for instance.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]