Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-06-14 07:16:02


Andy wrote:

> I have been playing with another solution. I wrapped the seed function
> in a class that models the random number generator concept. Then used
> Boost.Iterators' function output iterator, and feed it into the seed
> function that takes iterators of the random number generator.

The Boost.Random engines seem to provide a seed overload that takes a
generator, so it would be easier to just use that. But you should also keep
in mind that this approach will result in 125 calls to sha1_random_digest
each time an uuid_generator<> is created. This might not be acceptable for
the typical case where the user only needs one UUID.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk