From c12bf207033cb5d3ff2bf4d406c79d1f95d5b0e1 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 1 Aug 2023 15:53:45 +0200 Subject: [PATCH] feat: lvalue reference overload of `relative()` added Relates to #476 --- src/core/include/mp-units/quantity_point.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/include/mp-units/quantity_point.h b/src/core/include/mp-units/quantity_point.h index b639ec444..5a4044cf4 100644 --- a/src/core/include/mp-units/quantity_point.h +++ b/src/core/include/mp-units/quantity_point.h @@ -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_); }