Skip to content

Commit

Permalink
feat: lvalue reference overload of relative() added
Browse files Browse the repository at this point in the history
Relates to #476
  • Loading branch information
mpusz committed Aug 1, 2023
1 parent c12b3b1 commit c12bf20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/include/mp-units/quantity_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class quantity_point {
quantity_point& operator=(quantity_point&&) = default;

// data access
[[nodiscard]] constexpr quantity_type& relative() & noexcept { return q_; }
[[nodiscard]] constexpr const quantity_type& relative() const& noexcept { return q_; }
[[nodiscard]] constexpr quantity_type&& relative() && noexcept { return std::move(q_); }
[[nodiscard]] constexpr const quantity_type&& relative() const&& noexcept { return std::move(q_); }
Expand Down

0 comments on commit c12bf20

Please sign in to comment.