From ac59d9f3a412f30efc77572ea74f9dfe67b3713f Mon Sep 17 00:00:00 2001 From: mwinterb Date: Tue, 24 Sep 2019 11:29:29 -0700 Subject: [PATCH] workaround VS2019 Update 3 compiler bug. (#1328) --- include/fmt/safe-duration-cast.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/fmt/safe-duration-cast.h b/include/fmt/safe-duration-cast.h index 72ec07c56eb0..38aef69b6f81 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");