Boost logo

Boost :

Subject: Re: [boost] [Random] make_variate_ref proposal
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-08-02 22:19:55


AMDG

Mostafa wrote:
> I propose adding a make_variate_ref helper function to Random library
> to save typing, so I don't have retype the Distribution type twice,
> and to help with accidentally forgetting to put "&" in the template
> parameter. Something along the lines of:
>
> template<typename Engine, typename Distribution>
> class boost::variate_generator<Engine &, Distribution &>
> make_variate_ref(Engine & engine, Distribution & dist)
> {
> boost::variate_generator<Engine &, Distribution &> variate(engine,
> dist);
> return variate;
> }
>
> What are your thoughts.

Once I get all the distributions updated, variate_generator is going
to be deprecated. It's not in the C++0x library.

In Christ,
Steven Watanabe


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