20 #ifndef MPD_LAZY_RANDOM_ENGINE_HXX
21 #define MPD_LAZY_RANDOM_ENGINE_HXX
52 static constexpr result_type
min() {
53 return std::mt19937::min();
56 static constexpr result_type
max() {
57 return std::mt19937::max();
61 assert(engine !=
nullptr);
63 return engine->operator()();
void AutoCreate()
Create and seed the real engine.
static constexpr result_type max()
LazyRandomEngine & operator=(const LazyRandomEngine &other)=delete
static constexpr result_type min()
std::mt19937::result_type result_type
A random engine that will be created and seeded on demand.