title: wstring string converter in Boost
body: <p>I use the Boost library to implement my application. All the string characters in the data model of my application are wide chars (wchar_t type). But in the boost library, some classes only hand the narrow char (char type), i.e. "<code>address boost::asio::ip::address::from_string(const char* str)</code>". So I need to make the conversion between std::string and std::wstring when call the boost functions.</p>
  
  <ol>
  <li>Is there performance issue due to the string conversions?</li>
  <li>In there the converter in Boost, which makes the conversion between std::wstring and std::string with good performance? </li>
  </ol>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Regarding the converter function. I find the code below works.</p>
  
  <pre><code>std::wstring wstr(L"Hello World");
  const std::string nstr( wstr.begin(),  wstr.end());
  const std::wstring wstr2(nstr.begin(), nstr.end());
  </code></pre>