Brian Dessent wrote:
I think what you want is:
template<class T>
struct B : A<T> {
typename A<T>::iterator it; };
Thankyou, but that misses the point. I'm not trying to fix the trivial
example. I'm trying to fix real code where the change you suggest would
be massive and would make the code unreadable.
Even the typedef method is much better than changing every use of the
type throughout the class.
I wrote the minimal example in the hopes that someone could explain how
to do what I want to do: Bring a typename into scope from a templated
base class
See also:
<http://gcc.gnu.org/gcc-3.4/changes.html>
<http://kegel.com/gcc/gcc4.html>
I expect somewhere in all the pages those two link to there is some
discussion of this issues. But starting from the top of those two, I
have no idea how to dig down to it. Near misses are easy to find, for
example:
http://womble.decadentplace.org.uk/c++/template-faq.html#base-lookup
My question is sort of a combination of questions 1 and 2 of that faq.
But the answers don't combine.