This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Issue with pointer redirection in inherited clauses
- From: Ian Lance Taylor <iant at google dot com>
- To: Tyler Earman <rem dot intellegare at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 05 May 2009 22:59:14 -0700
- Subject: Re: Issue with pointer redirection in inherited clauses
- References: <4A00D4BC.9010309@gmail.com>
Tyler Earman <rem.intellegare@gmail.com> 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