Boost logo

Boost :

From: Neal Becker (ndbecker2_at_[hidden])
Date: 2007-05-14 14:47:20

I'm confused. Usually I want to share the state of 1 underlying rng between
many distributions, to ensure good independence. So, for example:

boost::variate_generator<rng_t&, boost::uniform_real<> > gen;

But uniform_01 holds a rng member:
  base_type _rng;

which is not declared as a reference.

But, I _can't_ make it a reference, by doing:

boost::uniform_01<rng_t&> eng;

Because uniform_01 says:
  base_type& base() { return _rng; }
Which would then be && and won't compile.

What am I not understanding?

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