forked from mpusz/mp-units
feat: unit conversion operator added to quantity_point
This commit is contained in:
@@ -133,6 +133,13 @@ public:
|
|||||||
return point_origin.absolute() + relative();
|
return point_origin.absolute() + relative();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<Unit U>
|
||||||
|
requires detail::QuantityConvertibleTo<quantity_type, quantity<::mp_units::reference<quantity_spec, U{}>{}, Rep>>
|
||||||
|
[[nodiscard]] constexpr quantity_point<::mp_units::reference<quantity_spec, U{}>{}, PO, Rep> operator[](U) const
|
||||||
|
{
|
||||||
|
return quantity_point<quantity_spec[U{}], PO, Rep>{*this};
|
||||||
|
}
|
||||||
|
|
||||||
// member unary operators
|
// member unary operators
|
||||||
constexpr quantity_point& operator++()
|
constexpr quantity_point& operator++()
|
||||||
requires requires { ++q_; }
|
requires requires { ++q_; }
|
||||||
|
Reference in New Issue
Block a user