Boost logo

Boost :

Subject: Re: [boost] [reference_wrapper] feature request
From: Chard (boost_at_[hidden])
Date: 2009-04-27 14:25:05


"Thorsten Ottosen" <thorsten.ottosen_at_[hidden]> wrote in message
news:49F4B403.5040206_at_dezide.com...
> Hi,
>
> It came up again in the RangeEx review that we really need
> reference_wrapper<T> to implement a forwarding operator().

Because boost::random::uniform_01 takes its engine argument by value (and
cannot use a reference type), I use the
boost::random::detail::pass_through_engine wrapper to ensure re-use of the
same engine for different generators. That does provide operator().

Perhaps there's scope for some unification here.


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