isNaN

Queries whether a Checked!(T, WithNaN) object is not a number (NaN).

bool
isNaN
(
T
)
(
const Checked!(T, WithNaN) x
)

Parameters

x Checked!(T, WithNaN)

the Checked instance queried

Return Value

Type: bool

true if x is a NaN, false otherwise

Examples

auto x1 = Checked!(int, WithNaN)();
assert(x1.isNaN);
x1 = 1;
assert(!x1.isNaN);
x1 = x1.init;
assert(x1.isNaN);

Meta