将整数字面量提升到类型级别的整数
作者:Hideyuki Tanaka
#4 in #提升
3KB
use typenum::Unsigned use typenum_promote::promote; assert_eq!(<promote!(12345) as Unsigned>::to_u64(), 12345);
~1.5MB ~39K SLoC