Skip to content

Commit

Permalink
[TESTS] Fix random generator for custom signed types
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-paramuzov committed Oct 11, 2023
1 parent b345f3c commit 463e445
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#pragma once

#include <cmath>
#include <limits>
#include <random>
#include <utility>

Expand Down Expand Up @@ -223,7 +224,7 @@ void inline fill_data_random(T* pointer,
const uint32_t k_range = k * range; // range with respect to k
random.Generate(k_range);

if (start_from < 0 && !std::is_signed<T>::value) {
if (start_from < 0 && !std::numeric_limits<T>::is_signed) {
start_from = 0;
}
for (std::size_t i = 0; i < size; i++) {
Expand Down

0 comments on commit 463e445

Please sign in to comment.