On Thursday 27 March 2003 11:55 pm, John Levon wrote: > On Thu, Mar 27, 2003 at 11:42:29PM +0000, Angus Leeming wrote: > > template <class T> > > class B : public T > > { > > public: > > void foo() > > { > > if (emergency_exit) > > ... > > } > > }; > > > > > And how would "this->" assist in telling the > > > compiler that it is from the base class (as opposed to the derived > > > class)? > > > > It says that it's a member. Since it's not in B, it has to be in T. > > I don't get it, why does the compiler need the this-> hint at all ? > > I'm sure he is right but I still don't understand it intuitively.
Me neither and nor, it would appear do the folks on comp.lang.c++. Point your news reader there and have a look at the thread Why is "this->member_variable" better code than "member_variable"? It's evolving all the time... Angus