diff --git a/src/core/include/mp-units/quantity.h b/src/core/include/mp-units/quantity.h index 0bc104ae..748d9efc 100644 --- a/src/core/include/mp-units/quantity.h +++ b/src/core/include/mp-units/quantity.h @@ -46,9 +46,10 @@ namespace detail { template using quantity_like_type = quantity::reference, typename quantity_like_traits::rep>; -template +template concept RepSafeConstructibleFrom = - std::constructible_from && (treat_as_floating_point || !treat_as_floating_point); + Unit> && std::constructible_from && + (treat_as_floating_point || (!treat_as_floating_point && is_rational(get_canonical_unit(U).mag))); template concept IntegralConversionFactor = Unit && Unit &&