From 4d1e225d9e05a7d9a3b0e55f551844fd771e9472 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Sat, 9 Nov 2019 14:16:37 +0000 Subject: [PATCH] UnitRep renamed to QuantityRep --- src/include/units/quantity.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/include/units/quantity.h b/src/include/units/quantity.h index 14a69603..812f7a57 100644 --- a/src/include/units/quantity.h +++ b/src/include/units/quantity.h @@ -50,9 +50,9 @@ namespace units { template concept Scalar = (!Quantity) && Number; - // UnitRep + // QuantityRep template - concept UnitRep = Scalar && + concept QuantityRep = Scalar && // integral ((treat_as_floating_point == false && requires(T a, T b) { @@ -68,7 +68,7 @@ namespace units { ::units::isnan(std::forward(a)); }); - template + template class quantity; namespace detail { @@ -99,7 +99,7 @@ namespace units { } // namespace detail - template> + template> using common_quantity = detail::common_quantity_impl::type; // quantity_cast @@ -166,7 +166,7 @@ namespace units { return cast::cast(q); } - template + template [[nodiscard]] constexpr quantity quantity_cast(const quantity& q) { return quantity_cast>(q); @@ -178,7 +178,7 @@ namespace units { return quantity_cast>(q); } - template + template [[nodiscard]] constexpr quantity quantity_cast(const quantity& q) { return quantity_cast>(q); @@ -186,7 +186,7 @@ namespace units { // quantity_values - template + template struct quantity_values { static constexpr Rep zero() noexcept { return Rep(0); } static constexpr Rep one() noexcept { return Rep(1); } @@ -196,7 +196,7 @@ namespace units { // quantity - template + template class quantity { Rep value_; @@ -338,7 +338,7 @@ namespace units { } template - [[nodiscard]] constexpr UnitRep AUTO operator*(const quantity& lhs, const quantity& rhs) + [[nodiscard]] constexpr QuantityRep AUTO operator*(const quantity& lhs, const quantity& rhs) requires same_dim> { using common_rep = decltype(lhs.count() * rhs.count()); @@ -380,7 +380,7 @@ namespace units { } template - [[nodiscard]] constexpr UnitRep AUTO operator/(const quantity& lhs, const quantity& rhs) + [[nodiscard]] constexpr QuantityRep AUTO operator/(const quantity& lhs, const quantity& rhs) requires same_dim { Expects(rhs != std::remove_cvref_t(0));