From 8ebb470cbf7e07dfa14664ab8e6dc73748c48c16 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 25 Jun 2024 14:32:17 -0500 Subject: [PATCH] fix: compilation on older compilers fixed --- src/core/include/mp-units/framework/quantity_spec.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/include/mp-units/framework/quantity_spec.h b/src/core/include/mp-units/framework/quantity_spec.h index cfbf9967..6ba39075 100644 --- a/src/core/include/mp-units/framework/quantity_spec.h +++ b/src/core/include/mp-units/framework/quantity_spec.h @@ -1530,9 +1530,9 @@ template [[nodiscard]] consteval QuantitySpec auto common_quantity_spec(QuantitySpec auto q) { return q; } template + requires detail::QuantitySpecConvertibleTo || + detail::QuantitySpecConvertibleTo [[nodiscard]] consteval QuantitySpec auto common_quantity_spec(Q1 q1, Q2 q2) - requires detail::QuantitySpecConvertibleTo || - detail::QuantitySpecConvertibleTo { using QQ1 = decltype(detail::remove_kind(q1)); using QQ2 = decltype(detail::remove_kind(q2)); @@ -1558,10 +1558,10 @@ template return q2; else if constexpr (implicitly_convertible(Q2{}, Q1{})) return q1; - else if constexpr (implicitly_convertible(get_kind_tree_root(Q1{}), get_kind_tree_root(Q2{}))) - return get_kind_tree_root(q2); + else if constexpr (implicitly_convertible(detail::get_kind_tree_root(Q1{}), detail::get_kind_tree_root(Q2{}))) + return detail::get_kind_tree_root(q2); else - return get_kind_tree_root(q1); + return detail::get_kind_tree_root(q1); // NOLINTEND(bugprone-branch-clone) }