Boost logo

Boost :

Subject: [boost] [Random] make_variate_ref proposal
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2010-08-02 21:46:42

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,
     return variate;

What are your thoughts.


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