Skip to content

mp_units::isnan

isnan overloads

Synopses

Declared in <mp-units/math.h>

Determines if a quantity is a nan.

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;

» more...

Determines if a quantity point is a nan.

template<auto R, auto PO, typename Rep>
  requires requires(quantity<R, Rep> q) { isnan(q); }
[[nodiscard]] constexpr bool isnan(quantity_point<R, PO, Rep> const& a) noexcept;

» more...

Return Value

  • bool: Whether the quantity is a NaN or not.
  • bool: Whether the quantity point is a NaN or not.

Note

The return value should not be discarded.

Parameters

NameDescription
aQuantity to analyze.