var._fpToI64Checked

private T _fpToI64Checked(T)(double v) static @safe

Checked float-to-64-bit-integer conversion for as / tryAs.

std.conv.to falsely succeeds on some out-of-range boundary inputs (to!long(2^63) yields long.min, to!ulong(2^64) yields a wrapped value), so the exact bounds are enforced here before delegating: signed targets accept [-2^63, 2^63), unsigned targets [0, 2^64). In-range values keep std.conv's behavior verbatim (including its truncation of fractional values, which the strict convertTo kernel deliberately does not share).

Throws

ConvException for NaN and out-of-range values, matching the

exception family the delegated std.conv path raises.