Skip to content

mp_units::quantity::operator-=

Subtraction assignment operator

Synopsis

Declared in <mp-units/framework/quantity.h>

template<auto R2, typename Rep2>
  requires(mp_units::implicitly_convertible(get_quantity_spec(R2), quantity_spec)) &&
          detail::ImplicitConversion<get_unit(R2), Rep2, unit, rep> && requires(rep& a, const Rep2 b) {
            { a -= b } -> std::same_as<rep&>;
          }
constexpr quantity& operator-=(quantity<R2, Rep2> const& other) &;

Return Value

Reference to the current object

Parameters

NameDescription
otherThe right operand