From a4bd69a9d5ee793b5615d8955503fa093af47235 Mon Sep 17 00:00:00 2001 From: Federico Fernandez Date: Mon, 7 Jul 2025 19:44:29 +0200 Subject: [PATCH] Change `-numeric_limits::max` in .cmake file --- cmake/checks/check_01_cxx_features.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index 896e056c08..2393834704 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -436,7 +436,7 @@ unset_if_changed(CHECK_CXX_FEATURES_FLAGS_SAVED # Check that we can use feenableexcept through the C++11 header file cfenv: # # The test is a bit more complicated because we also check that no garbage -# exception is thrown if we convert -std::numeric_limits::max to a +# exception is thrown if we convert std::numeric_limits::lowest to a # string. This sadly happens with some compiler support libraries :-( # # - Timo Heister, 2015 @@ -451,7 +451,7 @@ set(_snippet { feenableexcept(FE_DIVBYZERO|FE_INVALID); std::ostringstream description; - const double lower_bound = -std::numeric_limits::max(); + const double lower_bound = std::numeric_limits::lowest(); description << lower_bound; -- 2.39.5