This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Implicit typename deprecated?
- From: Gokhan Kisacikoglu <kisa at centropolisfx dot com>
- To: Dave Williss <dwilliss at microimages dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 12 Sep 2002 18:24:49 -0700
- Subject: Re: Implicit typename deprecated?
- Organization: Centropolis Effects, LLC
- References: <029301c24dd6$11adfb30$2200000a@opus800>
- Reply-to: kisa at centropolisfx dot com
it already tells you to use:
typename OBSERVERLIST :: ITERATOR m_it;
instead of
OBSERVERLIST :: ITERATOR m_it;
The only way you can completely get rid of, as far as I know, is;
typedef typename OBSERVERLIST :: ITERATOR OBSERVERLIST_ITERATOR;
and then use;
OBSERVERLIST_ITERATOR m_it;
HTH,
Gokhan
Dave Williss wrote:
>
> Hi,
>
> After upgrading compilers to gcc 3.1, I get this warning a lot....
>
> warning: `typename MILIST<_T*>::ITERATOR' is implicitly a typename
> warning: implicit typename is deprecated, please see the documentation for
> details
>
> Where is the documentation it's referring to? It doesn't seem to be in the
> man pages.
> All I can find is an option -Wno-deprecated to not give the warning.
>
> This is in the definition for a template class (very abbreviated excerpt
> below...)
>
> template <class _T> class SUBJECT {
> public:
> typedef MILIST<_T*> OBSERVERLIST;
> class ITERATOR {
> // bunch of stuff left out to keep email short
> private:
> OBSERVERLIST::ITERATOR m_it; // This is the line with
> the warning
> };
> };
>
> Obviously the MILIST<> template defines a public nested class ITERATOR.
>
> I originally had MILIST<_T*>::ITERATOR m_it and changed it to use the
> typedef to try to get rid of the warning, but it didn't help.
>
> -- Dave Williss
> ------
> Meddle not in the affairs of dragons,
> for you are crunchy and taste good with catsup
--
Gökhan Kisacikoglu CFX
Senior Technical Director 10950 W Washington Blvd
kisa@centropolisfx.com 310.204.7300 x263 Culver City, CA, 90232
Key: Gö(GIrl)-khan Kis(cirCUS)-a-(Art)-cik(loGIC)-og(thOUGH)-lu(fLU)