workaround VS2019 Update 3 compiler bug.

This commit is contained in:
Michael Winterberg 2019-09-24 10:27:45 -07:00
parent 8f27ce4d8b
commit 35658bf42d

View File

@ -161,7 +161,7 @@ To safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> 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<typename From::period, typename To::period>;
struct Factor : std::ratio_divide<typename From::period, typename To::period>{};
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<FromRep, FromPeriod> 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<typename From::period, typename To::period>;
struct Factor : std::ratio_divide<typename From::period, typename To::period>{};
static_assert(Factor::num > 0, "num must be positive");
static_assert(Factor::den > 0, "den must be positive");