mp_units::utility::safe_int::operator-

Returns the negation of the wrapped value, reacting to ErrorPolicy on overflow.

Synopsis

Declared in <mp-units/utility/safe_int.h>

[[nodiscard]]
constexpr
safe_int<decltype(-value_), ErrorPolicy>
operator-() const;

Return Value

the negated (and possibly promoted) wrapped value

NOTE

The return value should not be discarded.