mp_units::usc::operator-¶
Subtraction operators
Synopses¶
Declared in <mp-units/framework/quantity_point.h>
Subtraction operator
template<
/* implementation-defined */ PO, Quantity Q>
requires PointOriginFor<PO, Q::quantity_spec>
[[nodiscard]] constexpr QuantityPoint auto operator-(PO po, Q const& q)
requires requires { -q; };
Subtraction operator
template<
/* implementation-defined */ PO1,
/* implementation-defined */ PO2>
requires(PointOriginFor<PO2, get_quantity_spec(PO1{})> ||
PointOriginFor<PO1, get_quantity_spec(PO2{})>) &&
(is_derived_from_specialization_of_v<PO1, relative_point_origin> ||
is_derived_from_specialization_of_v<PO2, relative_point_origin>) &&
(detail::origin_offset_representable<PO1, PO2>() ||
detail::unsatisfied<
"The offset of origin '{}' from '{}' overflows the '{}' representation type">(
type_name(PO1{}), type_name(PO2{}),
type_name<typename decltype(detail::raw_origin_offset<PO1, PO2>())::rep>()))
[[nodiscard]] constexpr Quantity auto operator-(PO1 lhs, PO2 rhs);
Return Value¶
Note
The return value should not be discarded.