pub fn maxInt(comptime T: type) comptime_int
Returns the maximum value of integer type T.
T: type
1437 1438 1439 1440
pub fn maxInt(comptime T: type) comptime_int { const info = @typeInfo(T).int; return (1 << (info.bits - @intFromBool(info.signedness == .signed))) - 1; }
Returns the maximum value of integer type T.