delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/03/17/18:00:36

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Lines: 37
X-Admin: news AT aol DOT com
From: dang2015 AT aol DOT com (DanG2015)
Newsgroups: comp.os.msdos.djgpp
Date: 17 Mar 2004 22:33:07 GMT
Organization: AOL http://www.aol.com
Subject: iterator depricated warning
Message-ID: <20040317173307.02207.00001634@mb-m19.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I'm sure there's a simple answer to this, but I can't find it.

The code:========================

#include <deque>

template <class T>
class foo {

public:
    std::deque<T>   foo_deque;

    void foo_method( void ) {
        std::deque<T>::iterator i = foo_deque.begin();
    }
};

int main( void ) {
}

the compile=========================

C:> gpp -Wall test.cpp
test.cpp: In member function `void foo<T>::foo_method()':
test.cpp:10: warning: `typename std::deque<T, std::allocator<_CharT>
>::iterator' is implicitly a typename
test.cpp:10: warning: implicit typename is deprecated, please see the
documentation for details

The original code that generated this message (too bulky to include,
so I made the little example above) will compile and run just fine, but
I'd love to understand the warning and how to get past it.  The compiler
is DJGPP gcc version 3.2.

Thanks in advance,

Dan

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019