c++/6283: iterator type definitions not accessible in derived template classes

pme@gcc.gnu.org pme@gcc.gnu.org
Fri Apr 12 14:58:00 GMT 2002


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



More information about the Gcc-bugs mailing list