title: How to efficiently copy a std::vector<char> to a std::string
body: <p>This question is a flip side of this <a href="https://stackoverflow.com/questions/7378087/how-to-efficiently-copy-a-stdstring-into-a-vector">How to efficiently copy a std::string into a vector</a> <br>
  I typically copy the vector this way ( null terminated string )<br></p>
  
  <pre><code>std::string s((char*)&amp;v[0]);
  </code></pre>
  
  <p>or ( if the string has already been declared ) like this<br></p>
  
  <pre><code>s = (char*)&amp;v[0];
  </code></pre>
  
  <p>It gets the job done but perhaps there are better ways.<br><br>
  <strong>EDIT</strong><br><br>
  C-style casts are ugly, I am told so what about this<br></p>
  
  <pre><code>s = reinterpret_cast&lt;char*&gt;(&amp;vo[0]);
  </code></pre>