diff --git a/include/boost/static_string/static_string.hpp b/include/boost/static_string/static_string.hpp index 7d2d87f..d1f4943 100644 --- a/include/boost/static_string/static_string.hpp +++ b/include/boost/static_string/static_string.hpp @@ -350,10 +350,10 @@ integer_to_string( } if (value < 0) { - const bool is_min = value == std::numeric_limits::min(); + const bool is_min = value == (std::numeric_limits::min)(); // negation of a min value cannot be represented if (is_min) - value = std::numeric_limits::max(); + value = (std::numeric_limits::max)(); else value = -value; const auto last_char = str_end - 1; @@ -405,10 +405,10 @@ integer_to_wstring( } if (value < 0) { - const bool is_min = value == std::numeric_limits::min(); + const bool is_min = value == (std::numeric_limits::min)(); // negation of a min value cannot be represented if (is_min) - value = std::numeric_limits::max(); + value = (std::numeric_limits::max)(); else value = -value; const auto last_char = str_end - 1;