Menu

warning: typename is implicitly a typedef

2003-02-21
2012-09-26
  • Nobody/Anonymous

    How do I get rid of this nasty warning?  I have typedefs such as:  typedef Object<R>::C C and the compiler is complaining about deprecation about implictly being a typedef.  Can anyone elaborate on the warning and how to get rid of them?  Thanks kindly.

     
    • Nobody/Anonymous

      A simple example and the compile log would be helpful I bet...

      Wayne

       
    • Nobody/Anonymous

      this is my typedef:  

      typedef std::list<C>::iterator iterator;

      this is the warning:

      [Warning] `typename std::list<ObjectC<R>::C,
      [Warning] implicit typename is deprecated, please see the

       
    • Nobody/Anonymous

      Would like to add a question; what in the context of your code functionality does "typedef std::list<C>::iterator iterator; " to do ?. Can you give some of the code.

      I think the "implicit typename is deprecated" in the C in the <>, can't be sure without code.

       
    • Anonymous

      Anonymous - 2003-02-22

      "[Warning] implicit typename is deprecated, please see the"

      Please the the what? Copy the error text from "Compile log", not "Compiler". The compiler results window (stupidly) cuts off multi-line error messages.

      Are there more messages that follow?

      How do you intend to use iterator? I do not believe that it will work. You are defining a type iterator from a template class member without defining the type for the template class.

      My advice - this is too 'wierd and unusual', even if you make it work. it is not like

      list<int>::iterator myIterator ;

      is a lot ot typing, and it is much clearer.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.