diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index ef6a29903d07..8cecb1624f7d 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -212,7 +212,8 @@ To safe_duration_cast(std::chrono::duration from, } const auto min1 = (std::numeric_limits::min)() / Factor::num; - if (!std::is_unsigned::value && count < min1) { + if (detail::const_check(!std::is_unsigned::value) && + count < min1) { ec = 1; return {}; }