feat: lvalue reference overload of number() added

Resolves #476
This commit is contained in:
Mateusz Pusz
2023-08-01 15:51:49 +02:00
parent acfbd07bb7
commit c12b3b1ccc

View File

@@ -151,6 +151,7 @@ public:
quantity& operator=(quantity&&) = default; quantity& operator=(quantity&&) = default;
// data access // data access
[[nodiscard]] constexpr rep& number() & noexcept { return number_; }
[[nodiscard]] constexpr const rep& number() const& noexcept { return number_; } [[nodiscard]] constexpr const rep& number() const& noexcept { return number_; }
[[nodiscard]] constexpr rep&& number() && noexcept { return std::move(number_); } [[nodiscard]] constexpr rep&& number() && noexcept { return std::move(number_); }
[[nodiscard]] constexpr const rep&& number() const&& noexcept { return std::move(number_); } [[nodiscard]] constexpr const rep&& number() const&& noexcept { return std::move(number_); }