From d3f489a65df800e19c401f0af050cc842d6891bf Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Wed, 14 Dec 2022 18:06:09 +0500 Subject: [PATCH] Fix for issue #3228 Signed-off-by: Vladislav Shchapov --- include/fmt/chrono.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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