From 826e17722b1d8d87f0ec1e18ef96289d50a58ae6 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 13 Jun 2024 17:17:03 +0200 Subject: [PATCH] refactor: `get_associated_quantity` usage optimized in `unit.h` --- src/core/include/mp-units/framework/unit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/include/mp-units/framework/unit.h b/src/core/include/mp-units/framework/unit.h index e7786554..b4fbd126 100644 --- a/src/core/include/mp-units/framework/unit.h +++ b/src/core/include/mp-units/framework/unit.h @@ -206,7 +206,7 @@ struct named_unit : decltype(U)::_base_type_ { * @tparam QuantitySpec a specification of a quantity to be measured with this unit */ template - requires(!Symbol.empty()) && (QS.dimension == detail::get_associated_quantity(U).dimension) + requires(!Symbol.empty()) && (QS.dimension == decltype(detail::get_associated_quantity(U))::dimension) struct named_unit : decltype(U)::_base_type_ { using _base_type_ = named_unit; // exposition only static constexpr auto symbol = Symbol; ///< Unique unit identifier @@ -214,7 +214,7 @@ struct named_unit : decltype(U)::_base_type_ { }; template - requires(!Symbol.empty()) && (QS.dimension == detail::get_associated_quantity(U).dimension) + requires(!Symbol.empty()) && (QS.dimension == decltype(detail::get_associated_quantity(U))::dimension) struct named_unit : decltype(U)::_base_type_ { using _base_type_ = named_unit; // exposition only static constexpr auto symbol = Symbol; ///< Unique unit identifier