Incorporating boost random number generator as a class variable
问题 I'm trying to create a wrapper class for the boost random number generator, based on http://www.sitmo.com/article/generating-random-numbers-in-c-with-boost/. The problem is that boost uses templates and I don't know how to separate the declaration of GEN gen from the instantiation, like what can be done with separating DIST dist from dist = DIST(0, 1) . Any advice appreciated. fr.hpp: #include <boost/random/variate_generator.hpp> #include <boost/generator_iterator.hpp> #include <boost/random