From 6af58ba9d758bad99edf77ce4c5609250264cd2e Mon Sep 17 00:00:00 2001 From: Vukasin Milovanovic Date: Tue, 1 Mar 2022 11:27:28 -0800 Subject: [PATCH] add comment --- cpp/benchmarks/common/generate_input.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/benchmarks/common/generate_input.hpp b/cpp/benchmarks/common/generate_input.hpp index f39a9ae18cd..5246de00a73 100644 --- a/cpp/benchmarks/common/generate_input.hpp +++ b/cpp/benchmarks/common/generate_input.hpp @@ -114,6 +114,7 @@ std::pair default_range() template ()>* = nullptr> std::pair default_range() { + // Limits need to be such that `upper - lower` does not overflow return {std::numeric_limits::lowest() / 2, std::numeric_limits::max() / 2}; } } // namespace