title: How to convert std::string to std::vector<std::byte> in C++17?
body: <p>How do I convert a <code>std::string</code> to a <code>std::vector&lt;std::byte&gt;</code> in C++17? 
  <strong>Edited:</strong> I am filling an asynchronous buffer due to retrieving data as much as possible. So, I am using <code>std::vector&lt;std::byte&gt;</code> on my buffer and I want to convert string to fill it.</p>
  
  <pre><code>std::string gpsValue;
  gpsValue = "time[.........";
  std::vector&lt;std::byte&gt; gpsValueArray(gpsValue.size() + 1);
  std::copy(gpsValue.begin(), gpsValue.end(), gpsValueArray.begin());
  </code></pre>
  
  <p>but I am getting this error:</p>
  
  <pre><code>error: cannot convert ‘char’ to ‘std::byte’ in assignment
          *__result = *__first;
          ~~~~~~~~~~^~~~~~~~~~
  </code></pre>