use super::HasMaxValue;
pub trait MaxValueConst: HasMaxValue {
const MAX: Self;
}
macro_rules! impl_max_value_const {
($($ty:ty),+ $(,)?) => {
$(
impl MaxValueConst for $ty {
const MAX: Self = <$ty>::MAX;
}
)+
};
}
impl_max_value_const!(i8, i16, i32, i64, i128, isize);
impl_max_value_const!(u8, u16, u32, u64, u128, usize);
impl_max_value_const!(f32, f64);