The result of the cast operation.
auto x = checked!WithNaN(422); assert((cast(ubyte) x) == 255); x = checked!WithNaN(-422); assert((cast(byte) x) == -128); assert(cast(short) x == -422); assert(cast(bool) x); x = x.init; // set back to NaN assert(x != true); assert(x != false);
If rhs is WithNaN.defaultValue!Rhs, returns WithNaN.defaultValue!Lhs. Otherwise, returns cast(Lhs) rhs.