From 6e7a2fd0bbdbe9d0af7a854346b87868ae18050e Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 17 Oct 2023 12:11:32 +0200 Subject: [PATCH] refactor: order of overload for `Unit` changed --- src/core/include/mp-units/unit.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/include/mp-units/unit.h b/src/core/include/mp-units/unit.h index 58a614cf..c792f552 100644 --- a/src/core/include/mp-units/unit.h +++ b/src/core/include/mp-units/unit.h @@ -394,6 +394,15 @@ template [[nodiscard]] consteval Unit auto operator*(Unit auto, Magnitude auto) = delete; +/** + * Returns the result of multiplication with an inverse unit. + */ +template +[[nodiscard]] MP_UNITS_CONSTEVAL Unit auto operator/(M mag, const U u) +{ + return mag * inverse(u); +} + /** * `scaled_unit` specializations have priority in this operation. This means that the library framework * prevents passing it as an element to the `derived_unit`. In such case only the reference unit is passed @@ -412,15 +421,6 @@ template return detail::expr_multiply(lhs, rhs); } -/** - * Returns the result of multiplication with an inverse unit. - */ -template -[[nodiscard]] MP_UNITS_CONSTEVAL Unit auto operator/(M mag, const U u) -{ - return mag * inverse(u); -} - /** * `scaled_unit` specializations have priority in this operation. This means that the library framework * prevents passing it as an element to the `derived_unit`. In such case only the reference unit is passed