From 2b1e7edd691a6a45f337b38a24a9873b4a1189ea Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 9 Oct 2024 17:27:01 +0200 Subject: [PATCH] refactor: `derived_from_the_same_base_dimension` no longer needed --- src/core/include/mp-units/framework/dimension.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/core/include/mp-units/framework/dimension.h b/src/core/include/mp-units/framework/dimension.h index 6b2cb360..6b5bb846 100644 --- a/src/core/include/mp-units/framework/dimension.h +++ b/src/core/include/mp-units/framework/dimension.h @@ -68,15 +68,6 @@ using type_list_of_base_dimension_less = expr_less; template struct derived_dimension_impl : expr_fractions {}; -template -[[nodiscard]] consteval std::true_type derived_from_the_same_base_dimension(const base_dimension&, - const base_dimension&) -{ - return {}; -} - -[[nodiscard]] consteval std::false_type derived_from_the_same_base_dimension(...) { return {}; } - struct dimension_interface { template [[nodiscard]] friend consteval Dimension auto operator*(Lhs, Rhs) @@ -91,9 +82,9 @@ struct dimension_interface { } template - [[nodiscard]] friend consteval bool operator==(Lhs lhs, Rhs rhs) + [[nodiscard]] friend consteval bool operator==(Lhs, Rhs) { - return is_same_v || derived_from_the_same_base_dimension(lhs, rhs); + return is_same_v; } };