mp_units::quantity::operator--

Decrement operators

Synopses

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

Pre-decrements the numerical value.

constexpr
quantity&
operator--() &
requires requires(rep& v) {
      { --v } -> std::same_as<rep&>;
    };
» more...

Post-decrements the numerical value.

[[nodiscard]]
constexpr
QuantityOf<quantity_spec> auto
operator--(int unused_tag)
requires requires(rep& v) {
      { v-- } -> std::common_with<rep>;
    };
» more...

Return Value

  • *this, after the decrement.
  • A quantity holding the value of *this before the decrement.

Parameters

NameDescription
unused_tagAn unused tag parameter that distinguishes this overload as the post-decrement operator.