I am using boost::uuid in order to generate unique ids:
string UUid()
{
boost::uuids::uuid uuid = boost::uuids::random_generator()();
return boost::lexica
Please check http://www.boost.org/doc/libs/1_50_0/libs/uuid/uuid.html
The boost::uuids::basic_random_generator class
default constructor seeds the random number generator with a SHA-1 hash of a number of different values including std::time(0)
, std::clock()
, **uninitialized data**
, value return from new unsigned int
, etc..
...Using Valgrind produces a number of false positives with the default constructor of boost::uuids::basic_random_generator. One solution is to suppress the errors as described in Valgrind's documentation. Another solution is to use a different constructor of boost::uuids::basic_random_generator and explicitly pass in a random number generator.