Re: Issue with pointer redirection in inherited clauses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tyler Earman <rem.intellegare@xxxxxxxxx> writes:

> "I have noticed that when (this is C++) inheriting a templatized derived
> class from a templatized base that in g++, references to elements of the
> base class have to be qualified with this-> or with the name of the base
> class put in front.  But this is NOT needed in the Windows C++ compilers
> so far as I can see.  For example, Queue<T> might have a rep and a size
> in it; and Deque<T> can be setup to inherit from Queue<T> and where it
> references rep, it has to be this->rep.  But with the Windows compilers,
> just rep works in the derived class."

This is two-phase lookup, q.v.  The Windoes C++ compilers apparently do
not implement it correctly.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux