title: typedef vector template
body: <p>I'm trying to add some typedef to my class, but the compiler reports a syntax erron on the following code:</p>
  
  <pre><code>    template&lt;class T&gt;
      class MyClass{
          typedef std::vector&lt;T&gt; storageType; //this is fine
          typedef storageType::iterator iterator; //the error is here
  </code></pre>
  
  <p>but the next does not work too:</p>
  
  <pre><code>        typedef std::vector&lt;T&gt;::iterator iterator;
  </code></pre>
  
  <p>I was looking for the answers on many forum but i can't find a solution or workaround for this. Thank you for your help!</p>