* Implicit typename deprecated?
@ 2002-08-27 7:28 Dave Williss
2002-09-12 18:26 ` Gokhan Kisacikoglu
0 siblings, 1 reply; 2+ messages in thread
From: Dave Williss @ 2002-08-27 7:28 UTC (permalink / raw)
To: gcc-help
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Implicit typename deprecated?
2002-08-27 7:28 Implicit typename deprecated? Dave Williss
@ 2002-09-12 18:26 ` Gokhan Kisacikoglu
0 siblings, 0 replies; 2+ messages in thread
From: Gokhan Kisacikoglu @ 2002-09-12 18:26 UTC (permalink / raw)
To: Dave Williss; +Cc: gcc-help
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-09-13 1:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-27 7:28 Implicit typename deprecated? Dave Williss
2002-09-12 18:26 ` Gokhan Kisacikoglu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).