title: Generate boost::uuids::uuid from boost::compute::detail::sha1
body: <p>I am trying to generate <a href="https://www.boost.org/doc/libs/1_67_0/libs/uuid/doc/uuid.html" rel="nofollow noreferrer">boost::uuids::uuid</a> from <a href="https://www.boost.org/doc/libs/1_67_0/boost/compute/detail/sha1.hpp" rel="nofollow noreferrer">boost::compute::detail::sha1</a> in this way:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "boost/uuid/uuid.hpp"
  #include "boost/uuid/uuid_io.hpp"
  #include "boost/uuid/string_generator.hpp"
  #include "boost/compute/detail/sha1.hpp"
  
  int main(int argc, char* argv[])
  {
      try
      {
          boost::compute::detail::sha1 sha1("b888e35f9edf3794760392e1066d69-f43d-452e-8475-a09bae9a2e8500000000-0000-0000-0000-000000000000");
          std::string str = sha1;
          boost::uuids::uuid uuid = boost::uuids::string_generator()(str); // ERROR HERE!!
      }
      catch (std::exception&amp; e)
      {
          std::cerr &lt;&lt; "Error occurred: " &lt;&lt; e.what() &lt;&lt; std::endl;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>But this code fails with error <code>Error occurred: invalid uuid string</code> (See above)</p>
  
  <p>I am using Visual Studio 2017, Boost 1.67</p>
  
  <p>Where is my mistake? How to generate boost::uuids::uuid from boost::compute::detail::sha1</p>
  
  <p>PS: That code worked on previous boost versions.</p>