- template<class RNG = ThreadLocalPRNG>
- static uint32_t rand32(uint32_t min,
- uint32_t max,
- ValidRNG<RNG> rng = RNG()) {
+ static uint32_t rand32(uint32_t min, uint32_t max) {
+ return rand32(min, max, ThreadLocalPRNG());
+ }
+
+ /**
+ * Returns a random uint32_t in [min, max) given a specific RNG.
+ * If min == max, returns 0.
+ */
+ template <class RNG = ThreadLocalPRNG, class /* EnableIf */ = ValidRNG<RNG>>
+ static uint32_t rand32(uint32_t min, uint32_t max, RNG&& rng) {