diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index b23bb1afc01c..53f861fa8ce1 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -1053,7 +1053,7 @@ void write_fractional_seconds(OutputIt& out, Duration d, int precision = -1) { auto n = static_cast>(subseconds); const int num_digits = detail::count_digits(n); - int leading_zeroes = std::max(0, num_fractional_digits - num_digits); + int leading_zeroes = (std::max)(0, num_fractional_digits - num_digits); if (precision < 0) { FMT_ASSERT(!std::is_floating_point::value, ""); if (std::ratio_less