Trait dialectic::unary::LessThan[][src]

pub trait LessThan<N: Unary> where
    Self: Unary
{ }

Ensure than a unary number is strictly less than some other number.

Examples

This compiles, because 1 < 2:

use dialectic::prelude::*;
use dialectic::unary::*;

fn ok() where UnaryOf<1>: LessThan<UnaryOf<2>> {}

But this does not compile, because 2 >= 1:

fn bad() where UnaryOf<2>: LessThan<UnaryOf<1>> {}

Because LessThan is a strict less-than relationship (i.e. <, not <=), this does not compile either:

fn bad() where UnaryOf<100>: LessThan<UnaryOf<100>> {}

Implementors

impl<N: Unary> LessThan<S<N>> for Z[src]

impl<N: Unary, M: LessThan<N>> LessThan<S<N>> for S<M>[src]

Loading content...