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]

Re: Bring a typename into scope from a templated base class


John Fine wrote:

> Is there a correct way to do what I want "using typename" to do?
> If I use the "typedef typename" instead of the "using typename", it
> makes this example work, but it doesn't quite mean the same thing.  I'll
> use that if there isn't a way to make "using typename" work.  But I'd
> like to first understand the problem.

I think what you want is:

template<class T>
struct B : A<T> {
typename A<T>::iterator it; };

See also:
<http://gcc.gnu.org/gcc-3.4/changes.html>
<http://kegel.com/gcc/gcc4.html>

Brian


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