Skip to content

Commit

Permalink
feat: lvalue reference overload of number() added
Browse files Browse the repository at this point in the history
Resolves #476
  • Loading branch information
mpusz committed Aug 1, 2023
1 parent acfbd07 commit c12b3b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/include/mp-units/quantity.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class quantity {
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_); }
Expand Down

0 comments on commit c12b3b1

Please sign in to comment.