diff options
Diffstat (limited to 'absl/strings/internal/str_format/arg.h')
-rw-r--r-- | absl/strings/internal/str_format/arg.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/absl/strings/internal/str_format/arg.h b/absl/strings/internal/str_format/arg.h index 3376d48afda2..ec9e6f0063b1 100644 --- a/absl/strings/internal/str_format/arg.h +++ b/absl/strings/internal/str_format/arg.h @@ -335,12 +335,12 @@ class FormatArgImpl { using CommonType = typename std::conditional<std::is_signed<T>::value, int64_t, uint64_t>::type; if (static_cast<CommonType>(val) > - static_cast<CommonType>(std::numeric_limits<int>::max())) { - return std::numeric_limits<int>::max(); + static_cast<CommonType>((std::numeric_limits<int>::max)())) { + return (std::numeric_limits<int>::max)(); } else if (std::is_signed<T>::value && static_cast<CommonType>(val) < - static_cast<CommonType>(std::numeric_limits<int>::min())) { - return std::numeric_limits<int>::min(); + static_cast<CommonType>((std::numeric_limits<int>::min)())) { + return (std::numeric_limits<int>::min)(); } return static_cast<int>(val); } |