I use .data()
to get 16 bytes data array.
Later I write it to a file and I want to load it back to a uuid
variable.
Should I just perform memory copy to the variable as : (c++11)
boost::uuids::uuid uuid = boost::uuids::random_generator()();
char[16] data;
std::copy_n(&uuid, 16, data); // copy to data
std::copy_n(data, 16, &uuid); // copy from data (?)