This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Bring a typename into scope from a templated base class
- From: Brian Dessent <brian at dessent dot net>
- To: John Fine <johnsfine at verizon dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 25 Sep 2008 19:31:38 -0700
- Subject: Re: Bring a typename into scope from a templated base class
- References: <48DC46D3.9010704@verizon.net>
- Reply-to: gcc-help at gcc dot gnu dot org
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