diff options
Diffstat (limited to 'absl/time/time.h')
-rw-r--r-- | absl/time/time.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/time/time.h b/absl/time/time.h index b86abf27b045..ae3b3fad853b 100644 --- a/absl/time/time.h +++ b/absl/time/time.h @@ -1441,10 +1441,10 @@ T ToChronoDuration(Duration d) { using Period = typename T::period; static_assert(IsValidRep64<Rep>(0), "duration::rep is invalid"); if (time_internal::IsInfiniteDuration(d)) - return d < ZeroDuration() ? T::min() : T::max(); + return d < ZeroDuration() ? (T::min)() : (T::max)(); const auto v = ToInt64(d, Period{}); - if (v > (std::numeric_limits<Rep>::max)()) return T::max(); - if (v < (std::numeric_limits<Rep>::min)()) return T::min(); + if (v > (std::numeric_limits<Rep>::max)()) return (T::max)(); + if (v < (std::numeric_limits<Rep>::min)()) return (T::min)(); return T{v}; } |