BigInt.toInt

T toInt(T)() if (isIntegral!T) const pure @safe

Converts the BigInt to an integral type.

Delegates to the overflow-checked opCast!T, so the sign is honored and values that do not fit in T throw instead of silently truncating to the low limb.

Parameters

TThe integral target type.

Returns

The value of this BigInt as a T.

Throws

ConvOverflowException if the value does not fit in T.