From 35658bf42d6fc3eb2b3b5f78f85a0abd8f9b6817 Mon Sep 17 00:00:00 2001 From: Michael Winterberg Date: Tue, 24 Sep 2019 10:27:45 -0700 Subject: [PATCH] workaround VS2019 Update 3 compiler bug. --- include/fmt/safe-duration-cast.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/safe-duration-cast.h b/include/fmt/safe-duration-cast.h index 72ec07c5..d9770419 100644 --- a/include/fmt/safe-duration-cast.h +++ b/include/fmt/safe-duration-cast.h @@ -161,7 +161,7 @@ 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 +232,7 @@ 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");