From 7bad01fd45f2e6041d2e137a3942297f8b29ca60 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 16 May 2023 16:58:16 +0200 Subject: [PATCH] refactor: `Harmonic` concept renamed to `IntegralConversionFactor` --- src/core/include/mp_units/quantity.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/include/mp_units/quantity.h b/src/core/include/mp_units/quantity.h index 4862870e..9078c26b 100644 --- a/src/core/include/mp_units/quantity.h +++ b/src/core/include/mp_units/quantity.h @@ -50,9 +50,8 @@ template concept RepSafeConstructibleFrom = // exposition only std::constructible_from && (treat_as_floating_point || !treat_as_floating_point); -// UFrom ratio is an exact multiple of UTo template -concept Harmonic = // exposition only +concept IntegralConversionFactor = // exposition only Unit && Unit && is_integral(get_canonical_unit(UFrom).mag / get_canonical_unit(UTo).mag); @@ -61,7 +60,7 @@ concept QuantityConvertibleTo = // exposition only Quantity && Quantity && implicitly_convertible(QFrom::quantity_spec, QTo::quantity_spec) && convertible(QFrom::unit, QTo::unit) && requires(QFrom q) { detail::sudo_cast(q); } && (treat_as_floating_point || - (!treat_as_floating_point && Harmonic)); + (!treat_as_floating_point && IntegralConversionFactor)); template concept InvokeResultOf = std::regular_invocable && RepresentationOf, Ch>;