#pragma once #include namespace ZXing { class PseudoRandom { std::minstd_rand _random; public: PseudoRandom(size_t seed) : _random(static_cast(seed)) {} template IntType next(IntType low, IntType high) { return std::uniform_int_distribution(low, high)(_random); } }; }