
3 Aug
2010
3 Aug
'10
2:19 a.m.
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