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