title: difference in 2 template dependent typename kinds
body: <p>From Scott Meyers's book, names in a template that are dependent on a template parameter are called <strong>dependent names</strong>. 
  (When a dependent name is nested inside a class, I call it a nested dependent name)</p>
  
  <p>So its necessary to use "typename" keyword before the dependent name, right?</p>
  
  <pre><code>template&lt;typename C&gt;
  void print2nd(const C&amp; container) {
  typename C::const_iterator iter(container.begin()); 
  ...
  }
  </code></pre>
  
  <p>But why in this code, taken from Josuttis book, std::vector that is another template's instantiation which is obviously dependent on T, they do not use "typename" here:</p>
  
  <pre><code>template &lt;typename T&gt;
  class Stack {
      (?typename?) std::vector&lt;T&gt; elems;
  ...
  };
  </code></pre>
  
  <p>It all looks confusing especially with another example from Meyers:</p>
  
  <pre><code>template&lt;typename IterT&gt; 
  void workWithIterator(IterT iter) {
      typename std::iterator_traits&lt;IterT&gt;::value_type temp(*iter);
  ... }
  </code></pre>
  
  <p>They look all the same to me. How do you differentiate?</p>