Can't make "Implicit Typename Deprecated" warning go away
corey taylor
corey.taylor@gmail.com
Wed Apr 6 17:50:00 GMT 2005
Colm,
That typedef declaration is wrong.
typedef typename HashTable<KEY_T, DATA_T>::iterator MyIterator;
corey
On Apr 6, 2005 12:35 PM, Colm McHugh <cmchugh@callixa.com> wrote:
> Hi,
>
> I'm using gcc 3.3.3 on Linux, and compiling the following code:
>
> template < typename KEY_T, typename DATA_T >
> inline HashTable< KEY_T, DATA_T >::iterator
> HashTable< KEY_T, DATA_T >::find( const KeyType& key )
> {
> SizeType bucket;
> NodeType* node;
> //etc
>
> Gives the following warnings:
>
> HashTable_tmpl.cpp:170: warning: `HashTable<KEY_T, DATA_T>::iterator' is
> implicitly a typename
> HashTable_tmpl.cpp:170: warning: implicit typename is deprecated, please
> see the documentation for details
>
> I changed the line that begins with inline to include the 'typename'
> keyword immediately after the inline keyword,
> as described in http://gcc.gnu.org/ml/gcc/2003-06/msg00978.html, but
> that makes no difference, the warning still
> shows up. I also tried adding the following typedef to the HashTable
> class definition:
>
> typedef typename HashTable<KEY_T, DATA_T>::iterator;
>
> but that makes no difference as well. Can anyone point out what I'm
> missing ?
>
> Thanks,
> Colm.
>
>
More information about the Gcc-help
mailing list