diff --git a/include/fmt/safe-duration-cast.h b/include/fmt/safe-duration-cast.h index 72ec07c5..38aef69b 100644 --- a/include/fmt/safe-duration-cast.h +++ b/include/fmt/safe-duration-cast.h @@ -161,7 +161,8 @@ To safe_duration_cast(std::chrono::duration from, ec = 0; // the basic idea is that we need to convert from count() in the from type // to count() in the To type, by multiplying it with this: - using Factor = std::ratio_divide; + struct Factor + : std::ratio_divide {}; static_assert(Factor::num > 0, "num must be positive"); static_assert(Factor::den > 0, "den must be positive"); @@ -232,7 +233,8 @@ To safe_duration_cast(std::chrono::duration from, // the basic idea is that we need to convert from count() in the from type // to count() in the To type, by multiplying it with this: - using Factor = std::ratio_divide; + struct Factor + : std::ratio_divide {}; static_assert(Factor::num > 0, "num must be positive"); static_assert(Factor::den > 0, "den must be positive");