pub trait TypedLessThan<N: IsInteger> {
type Output: Binary;
}
Expand description
A trait that returns a binary depending on whether a < b
Example
use const_arithmetic::*;
let a = parse_integer!(3);
// This verifies that a <= 5 but not a < 3
fn example<T, R, S>(_a: T) where
T: IsInteger,
R: Binary,
S: Binary,
T: TypedLessThan<TypedInteger<_3, _0, _0, _0, _0, _0, _0, _0>, Output = R>,
R: AssertFalse,
T: TypedLessThan<TypedInteger<_5, _0, _0, _0, _0, _0, _0, _0>, Output = S>,
S: AssertTrue
{}
example(a);