
3 Aug
2010
3 Aug
'10
1:46 a.m.
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. -Mostafa