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 fbc8e77 commit fa63f3cCopy full SHA for fa63f3c
1 file changed
cpp/test/common/sort.cpp
@@ -29,7 +29,8 @@ TEMPLATE_TEST_CASE("Test radix sort", "[vector][template]", std::int16_t,
29
vec.reserve(vec_size);
30
31
// Generate a vector of ints with a Uniform Int distribution
32
- std::uniform_int_distribution<TestType> distribution(-10000, 10000);
+ constexpr TestType lower_bound = std::is_signed_v<TestType> ? -10000 : 0;
33
+ std::uniform_int_distribution<TestType> distribution(lower_bound, 10000);
34
std::mt19937 engine;
35
auto generator = std::bind(distribution, engine);
36
std::generate_n(std::back_inserter(vec), vec_size, generator);
0 commit comments