This commit is contained in:
@ -114,7 +114,8 @@ inline auto generate_random_between(data_t begin, data_t end) -> data_t {
|
|||||||
throw std::range_error("end must be greater than begin");
|
throw std::range_error("end must be greater than begin");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::mt19937 gen(std::random_device{}());
|
std::random_device rd{};
|
||||||
|
std::mt19937 gen(std::time(nullptr) ^ static_cast<unsigned>(rd()));
|
||||||
std::uniform_int_distribution<data_t> dis(begin, end);
|
std::uniform_int_distribution<data_t> dis(begin, end);
|
||||||
return dis(gen);
|
return dis(gen);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user