From c12b3b1cccbc215937fb1f70cd2224a28711f545 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 1 Aug 2023 15:51:49 +0200 Subject: [PATCH] feat: lvalue reference overload of `number()` added Resolves #476 --- src/core/include/mp-units/quantity.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/include/mp-units/quantity.h b/src/core/include/mp-units/quantity.h index 3d3642b3..c85bc0be 100644 --- a/src/core/include/mp-units/quantity.h +++ b/src/core/include/mp-units/quantity.h @@ -151,6 +151,7 @@ public: quantity& operator=(quantity&&) = default; // data access + [[nodiscard]] constexpr rep& number() & noexcept { return number_; } [[nodiscard]] constexpr const rep& number() const& noexcept { return number_; } [[nodiscard]] constexpr rep&& number() && noexcept { return std::move(number_); } [[nodiscard]] constexpr const rep&& number() const&& noexcept { return std::move(number_); }