Skip to main content

integer_max

Function integer_max 

Source
pub const fn integer_max<T: IntegerPrimitive>(a: T, b: T) -> T
🔬This is a nightly-only experimental API. (core_intrinsics)
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Expand description

Integer maximum, signed or unsigned depending on T.

Allowed only on uN, iN, usize, and isize. (Not on bool nor on char.)

Stabilized as u16::max and i64::max and similar.