title: Using a templated parameter's value_type
body: <p>How is one supposed to use a std container's value_type?<br>
  I tried to use it like so:</p>
  
  <pre><code>#include &lt;vector&gt;
  
  using namespace std;
  
  template &lt;typename T&gt;
  class TSContainer {
  private:
          T container;
  public:
          void push(T::value_type&amp; item)
          {
                  container.push_back(item);
          }
          T::value_type pop()
          {
                  T::value_type item = container.pop_front();
                  return item;
          }
  };
  int main()
  {
          int i = 1;
          TSContainer&lt;vector&lt;int&gt; &gt; tsc;
          tsc.push(i);
          int v = tsc.pop();
  }
  </code></pre>
  
  <p>But this results in:</p>
  
  <pre><code>prog.cpp:10: error: ‘T::value_type’ is not a type
  prog.cpp:14: error: type ‘T’ is not derived from type ‘TSContainer&lt;T&gt;’
  prog.cpp:14: error: expected ‘;’ before ‘pop’
  prog.cpp:19: error: expected `;' before ‘}’ token
  prog.cpp: In function ‘int main()’:
  prog.cpp:25: error: ‘class TSContainer&lt;std::vector&lt;int, std::allocator&lt;int&gt; &gt; &gt;’ has no member named ‘pop’
  prog.cpp:25: warning: unused variable ‘v’
  </code></pre>
  
  <p>I thought this was what ::value_type was for?</p>