title: Vector of vectors of T in template<T> class
body: <p>Why this code does not compile (Cygwin)?</p>
  
  <pre><code>#include &lt;vector&gt;
  
  template &lt;class Ttile&gt;
  class Tilemap
  {
      typedef std::vector&lt; Ttile &gt; TtileRow;
      typedef std::vector&lt; TtileRow &gt; TtileMap;
      typedef TtileMap::iterator TtileMapIterator; // error here
  };
  </code></pre>
  
  <blockquote>
    <p>error: type <code>std::vector&lt;std::vector&lt;Ttile, std::allocator&lt;_CharT&gt; &gt;, std::allocator&lt;std::vector&lt;Ttile, std::allocator&lt;_CharT&gt; &gt; &gt; &gt;' is not derived from type</code>Tilemap'</p>
  </blockquote>