| re: Inherited member name qualification for templated class
Victor Bazarov wrote:[color=blue]
> Lionel B wrote:[color=green]
> > [...]
> > Problem is, that in my real-world code there are (at least)
> > four template parameters and *many* inherited base class
> > members; having to quote the full templated base class name
> > for every reference to an inherited base class member would
> > make my code incredibly clunky and utterly unreadable. Is
> > there a workaround for this?[/color]
>
> Have you tried using 'this->'? The pun is not intended.[/color]
Yes that does work... but it then leaves my code littered with
"this->"es. Not as bad as base_class<foo_type, bar_type, baz_type,
....>::myvar all over the place, perhaps, but still pretty ugly.
I am still a bit puzzled as to why the compiler can't seem to resolve
the name. Can't think of a situation where such a construct might be
ambiguous - and even if there is one, my case is surely unambiguous?
--
Lionel B |