title: Byte size used by std::vector
body: <p>I'm interfacing <code>std::vector</code> to a C program which needs to know the size in bytes.</p>
  
  <p>Can I do this without the expression <code>sizeof(vec[0])</code>?</p>
  
  <pre><code>void *dest = get_dest();
  std::vector&lt;T&gt; vec;
  memcpy(dest, vec.data(), vec.size() * sizeof(vec[0]));
  </code></pre>
  
  <p>Please do not offer C++ style alternatives to <code>memcpy</code>.</p>