45 #ifndef __BASE_RANDOM_HH__
46 #define __BASE_RANDOM_HH__
50 #include <type_traits>
76 void init(uint32_t
s);
85 typename std::enable_if<std::is_integral<T>::value, T>
::type
89 std::uniform_int_distribution<T>
dist;
97 typename std::enable_if<std::is_floating_point<T>::value, T>
::type
101 std::uniform_real_distribution<T>
dist;
107 template <
typename T>
108 typename std::enable_if<std::is_integral<T>::value, T>
::type
111 std::uniform_int_distribution<T>
dist(min, max);
124 #endif // __BASE_RANDOM_HH__