diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 60e5a459..6915c5ca 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1319,20 +1319,20 @@ inline bool isfinite(T) { } // Converts value to int and checks that it's in the range [0, upper). -template ::value)> -inline std::intmax_t to_nonnegative_int(T value, std::intmax_t upper) { +template ::value)> +inline Int to_nonnegative_int(T value, Int upper) { FMT_ASSERT(value >= 0 && to_unsigned(value) <= to_unsigned(upper), "invalid value"); (void)upper; - return static_cast(value); + return static_cast(value); } -template ::value)> -inline std::intmax_t to_nonnegative_int(T value, std::intmax_t upper) { +template ::value)> +inline Int to_nonnegative_int(T value, Int upper) { FMT_ASSERT( std::isnan(value) || (value >= 0 && value <= static_cast(upper)), "invalid value"); (void)upper; - return static_cast(value); + return static_cast(value); } template ::value)>