Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2006-04-04 19:31:43

Bugs item #1464566, was opened at 2006-04-04 19:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: random
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Hubert Chan (uhoreg)
Assigned to: Jens Maurer (jmaurer)
Summary: uniform_01 copies engine instead of using a reference

Initial Comment:
In the uniform_01 class, the constructor takes a
base_type (i.e. the random number generator) as its
argument, and the _rng member is just a base_type.
This results in uniform_01 copying the random number
generator, along with its state. Thus if one creates
several uniform_01 objects (e.g. one at the beginning
of each of several functions), they will all return the
same random numbers.

The constructor should take a reference (i.e.
base_type&) as its argument, and the _rng member should
be a base_type&. (Indeed, the documentation at
says that the constructor takes a base_type&.)


You can respond by visiting:

This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at