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]

Issue with pointer redirection in inherited clauses


Hey guys,

This problem isn't mine directly, it belongs to a professor of mine. 
I'll paste his question verbatim bellow so I don't misquote him:

"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."

Any ideas on this one?  My guess is that it has something to do with
some issues with the scope or perhaps an issue with references to the
compiled objects.  Confirmation or another answer would be great.

If its a bug, if someone will tell me where it is and about the problem
I'd be glad to take a shot at fixing it as well.

Thanks,
Tyler


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