This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Implicit typename deprecated?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]