mp_units::si::operator-¶
Subtraction operator
Synopsis¶
Declared in <mp-units/framework/quantity_point.h>
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);
Note
This function is a hidden friend of absolute_zero, 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 |
|---|---|
| lhs | The left operand |
| rhs | The right operand |