Subtraction operator
Declared in <mp-units/framework/quantity.h>
template<
auto R1,
typename Rep1,
RepresentationOf<get_quantity_spec(R1)> Value>
requires ImplicitFromNumber<R1> && InvokeResultOf<get_quantity_spec(R1), std::minus<>, Rep1, const Value&>
[[nodiscard]]
constexpr
Quantity auto
operator-(
Value const& lhs,
quantity<R1, Rep1> const& rhs);
This function is a hidden friend of quantity, declared inside an implementation-defined base class: it can be found only through argument-dependent lookup.
The return value should not be discarded.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |