Skip to content

mp_units::isnan

Determines if a quantity is a nan.

Synopsis

Declared in <mp-units/math.h>

template<auto R, typename Rep>
  requires requires(Rep v) { isnan(v); }
#if MP_UNITS_HOSTED
           || requires(Rep v) { std::isnan(v); }
[[nodiscard]] constexpr bool isnan(quantity<R, Rep> const& a) noexcept;

Return Value

bool: Whether the quantity is a NaN or not.

Note

The return value should not be discarded.

Parameters

NameDescription
aQuantity to analyze.