This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: ADL Help


Perry Smith <pedz@easesoftware.com> writes:

> There are several pages just like it.  In particular this bullet would
> seem to apply but it must not for some reason:
> 
> | If T is a class type, its associated classes are the class itself and
> | its direct and indirect base classes. Its associated namespaces are
> | the namespaces in which its associated classes are defined.
> 
> It seems like the "here 1" version would be found but it is not.  Can
> you help me to understand what I'm missing?

Argument dependent lookup never finds a member function of a class.
It only finds functions declared in namespaces.

Don't get confused by the stuff about "associated classes."  Argument
dependent lookup doesn't look at the member functions of an associated
class.  ADL does look at the friend functions of associated classes--
that's why the concept of associated classes exists.

Ian


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