We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5e3485 commit 240c3bfCopy full SHA for 240c3bf
test/c++/itertools.cpp
@@ -373,8 +373,8 @@ TEST(Itertools, RangeRandomAccessOperations) {
373
374
// Create and fill a container of size n with random integers in [a,b].
375
template <typename C> auto random_int_range(std::size_t n, int a, int b) {
376
- static std::default_random_engine eng{0x12345678};
377
- auto cont = C(n);
+ static std::default_random_engine eng{std::random_device{}()};
+ auto cont = C(std::uniform_int_distribution<std::size_t>(0, n)(eng));
378
std::ranges::generate(cont, [&]() { return std::uniform_int_distribution<typename C::value_type>(a, b)(eng); });
379
return cont;
380
}
0 commit comments