#literals

macro typenum-promote

Promote integer literal to type-level integer

1 unstable release

0.1.0 Mar 7, 2020

#129 in #literals

MIT license

3KB

typenum-promote

Promote integer literal to type-level integer

use typenum::Unsigned
use typenum_promote::promote;

assert_eq!(<promote!(12345) as Unsigned>::to_u64(), 12345);

Dependencies

~1.5MB
~41K SLoC