
14 Jun
2007
14 Jun
'07
11:16 a.m.
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.