This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6283: iterator type definitions not accessible in derived template classes
- From: pme at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, joerg at eyematic dot com, nobody at gcc dot gnu dot org
- Date: 12 Apr 2002 21:58:25 -0000
- Subject: Re: c++/6283: iterator type definitions not accessible in derived template classes
- Reply-to: pme at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, joerg at eyematic dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: iterator type definitions not accessible in derived template classes
State-Changed-From-To: open->closed
State-Changed-By: pme
State-Changed-When: Fri Apr 12 14:58:24 2002
State-Changed-Why:
Thank you for your bug report.
This is a bug in your code. With 3.1 sources:
% g++ -c 6283.cc -Wall -W
6283.cc: In member function `void my_list<type>::print() const':
6283.cc:16: warning: `typename std::list<type, std::allocator<_CharT>
>::const_iterator' is implicitly a typename
6283.cc:16: warning: implicit typename is deprecated, please see the
documentation for details
%
Changing that line to read
typename list<type>::const_iterator i;
^^^^^^^^
(as required by standard C++) fixes the problem.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6283