pub trait AddU<U>where
U: Unsigned,{
type Output;
}Expand description
typenum doesn’t currently allow you to easily add an Integer with an Unsigned.
The AddU trait lets you add some Unsigned to both Integers and Unsigneds.
Example:
use typenum::*;
use ranged_num::AddU;
assert_type_eq!(<U6 as AddU<U3>>::Output, U9);
assert_type_eq!(<P6 as AddU<U3>>::Output, P9);
assert_type_eq!(<N6 as AddU<U3>>::Output, N3);