Skip to content

mp_units::utility::abs

Absolute value of an uncertain value

Synopsis

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

[[nodiscard]] constexpr uncertain abs(uncertain const& arg)
  requires requires { abs(arg.value()); } || requires { std::abs(arg.value()); };

Note

This function is a hidden friend of uncertain, declared only inside that class: it can be found only through argument-dependent lookup.

Description

NOTE

Uncertainty is preserved unchanged.

Return Value

Note

The return value should not be discarded.