45 #ifndef __BASE_RANDOM_HH__
46 #define __BASE_RANDOM_HH__
50 #include <type_traits>
80 void init(uint32_t
s);
89 typename std::enable_if_t<std::is_integral<T>::value, T>
93 std::uniform_int_distribution<T>
dist;
100 template <
typename T>
101 typename std::enable_if_t<std::is_floating_point<T>::value, T>
105 std::uniform_real_distribution<T>
dist;
111 template <
typename T>
112 typename std::enable_if_t<std::is_integral<T>::value, T>
115 std::uniform_int_distribution<T>
dist(min, max);
130 #endif // __BASE_RANDOM_HH__