macro_rules! max_size {
($first:ty $(, $other:ty)* $(,)?) => { ... };
}Expand description
Given multiple type names, return the size of the biggest type.
This can be used in const context. It is intended for computing the required size for Dst.
// Dst data will be the size of f64
let dst = Dst::<dyn Display, { max_size!(u32, f64, bool) }>::new(12.0);
assert!(size_of_val(&dst) > size_of::<f64>());