mp_units::operator-¶
Subtraction operator
Synopsis¶
Declared in <mp-units/framework/quantity_point.h>
template<auto R1, auto PO1, typename Rep1,
/* implementation-defined */ PO2>
requires ReferenceOf<decltype(R1), get_quantity_spec(PO2{})>
[[nodiscard]] constexpr Quantity auto operator-(quantity_point<R1, PO1, Rep1> const& qp,
PO2 po)
requires(PO1 == PO2{}) || OriginOffsetAddableTo<quantity<R1, Rep1>, PO1,
detail::subtracted_origin<PO1>(PO2{})>;
Note
This function is a hidden friend of quantity_point, declared inside an implementation-defined base class: it can be found only through argument-dependent lookup.
Return Value¶
Note
The return value should not be discarded.
Parameters¶
| Name | Description |
|---|---|
| qp | The left operand |
| po | The right operand |