Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-08-30 08:35:00


From: <nbecker_at_[hidden]>
> Here's what I get:
> SigGen2.H: In constructor `SigGen<Rng>::SigGen(Rng&, bool, double, bool,
> double, bool, double, double, bool, int, int) [with Rng = rng_t]':
> TestSigGen2.cc:25: instantiated from here
> SigGen2.H:96: no matching function for call to
> `maybe_random<boost::uniform_real<rng_t, double> >::maybe_random(bool&,
> double&, boost::uniform_real<rng_t, double>)'
> SigGen2.H:22: candidates are: maybe_random<boost::uniform_real<rng_t,
double>
> >::maybe_random(const maybe_random<boost::uniform_real<rng_t, double>
>&)
> SigGen2.H:25: maybe_random<Rng>::maybe_random(bool,
typename
> Rng::result_type, Rng&) [with Rng = boost::uniform_real<rng_t, double>]

A non-const reference cannot be bound to an rvalue. Try to change Rng & to
Rng const & in the maybe_random constructor.

--
Peter Dimov
Multi Media Ltd.

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