Cannot pass template argument to std::list<T>::iterator <p>I made a container template class as follow:</p> <pre><code>template&lt;typename K, typename V&gt; class hash_table { public: class iterator { private: list&lt;V&gt; list_; // Works well list&lt;V&gt;::iterator it_; // Fails: Syntax-error "iterator" list&lt;int&gt;::iterator it2_; // Works well }; //.... } </code></pre> <p>Can someone tell me, what I did wrong at <code>list&lt;V&gt;::iterator it_;</code>? Why should this be an syntax error?</p>