Creating myclass::iterator type?

From: John Smith (
Date: 09/08/04

Date: Wed, 8 Sep 2004 15:46:29 +0200


I have some code which I've been using on Microsoft VC++ for some time. Now
I wanted to port my application to Mac OS X which offers gcc and the build

Here is the troublesome code:

template<class T>
class CList
  typedef vector<T>::iterator iterator;

As you can see I want to use vector iterator and make it become an iterator
type for my class so I can use CList::iterator.

Gcc however says the following:

../shared/list.h:47: warning: `std::vector<OLYLXQHQSPOQSPX,
   std::allocator<_CharT> >::iterator' is implicitly a typename
../shared/list.h:47: warning: implicit typename is deprecated, please
   see the documentation for details

I wonder why this is deprecated? Does this mean it's not legal C++ ?

Thanks in advance.
-- John