feat: lvalue reference overload of relative() added

Relates to #476
This commit is contained in:
Mateusz Pusz
2023-08-01 15:53:45 +02:00
parent c12b3b1ccc
commit c12bf20703

View File

@@ -134,6 +134,7 @@ public:
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_); }