title: How can I get sizeof a vector::value_type?
body: <p>I want to get <code>sizeof</code> of the type that is contained in a vector. Here is what I tried:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  int main()
  {
      std::vector&lt;uint&gt; vecs;
      std::cout &lt;&lt; sizeof(vecs.value_type) &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>From my understanding this should be correct. However, when compiling with GCC 4.8.1 this is what I get:</p>
  
  <pre>test-sizeof.cpp: In function ‘int main()’:
  test-sizeof.cpp:7:27: error: invalid use of ‘std::vector&lt;unsigned int&gt;::value_type’
    std::cout &lt;&lt; sizeof(vecs.value_type) &lt;&lt; std::endl;
                             ^</pre>
  
  <p>What am I doing wrong? How can I get the size of the contained type?</p>