Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. implicit typename is deprecated

implicit typename is deprecated

Scheduled Pinned Locked Moved ATL / WTL / STL
c++graphicshelpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xiaohe521
    wrote on last edited by
    #1

    Hi why compile this method occurs warning! can the warnnings be disapper? template void Fun() { vector vecTest; vector::iterator iter = vecTest.begin(); } main.cpp: In function `void Fun()': main.cpp:10: warning: `typename std::vector >::iterator' is implicitly a typename main.cpp:10: warning: implicit typename is deprecated, please see the documentation for details please help me I love Programming

    X C R 3 Replies Last reply
    0
    • X xiaohe521

      Hi why compile this method occurs warning! can the warnnings be disapper? template void Fun() { vector vecTest; vector::iterator iter = vecTest.begin(); } main.cpp: In function `void Fun()': main.cpp:10: warning: `typename std::vector >::iterator' is implicitly a typename main.cpp:10: warning: implicit typename is deprecated, please see the documentation for details please help me I love Programming

      X Offline
      X Offline
      xiaohe521
      wrote on last edited by
      #2

      my compiler is gcc I love Programming

      1 Reply Last reply
      0
      • X xiaohe521

        Hi why compile this method occurs warning! can the warnnings be disapper? template void Fun() { vector vecTest; vector::iterator iter = vecTest.begin(); } main.cpp: In function `void Fun()': main.cpp:10: warning: `typename std::vector >::iterator' is implicitly a typename main.cpp:10: warning: implicit typename is deprecated, please see the documentation for details please help me I love Programming

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        If you were to check 'Do not treat <'s as HTML tags', your message would be readable :-) Christian Graus - Microsoft MVP - C++

        1 Reply Last reply
        0
        • X xiaohe521

          Hi why compile this method occurs warning! can the warnnings be disapper? template void Fun() { vector vecTest; vector::iterator iter = vecTest.begin(); } main.cpp: In function `void Fun()': main.cpp:10: warning: `typename std::vector >::iterator' is implicitly a typename main.cpp:10: warning: implicit typename is deprecated, please see the documentation for details please help me I love Programming

          R Offline
          R Offline
          Roland Pibinger
          wrote on last edited by
          #4

          You need to write:

          template<class T>
          void Fun()
          {
            vector<T> vecTest;
            typename vector<T>::iterator iter = vecTest.begin();
          }
          

          See also: C++ Templates FAQ[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups