Trait dialectic::unary::Add[][src]

pub trait Add: Add {
    type Result: Unary;
}

Add two unary numbers at the type level.

Examples

use dialectic::prelude::*;
use dialectic::unary::*;
use static_assertions::assert_type_eq_all;

assert_type_eq_all!(<(UnaryOf<1>, UnaryOf<1>) as Add>::Result, UnaryOf<2>);
assert_type_eq_all!(<(UnaryOf<5>, UnaryOf<7>) as Add>::Result, UnaryOf<12>);

Associated Types

type Result: Unary[src]

The result of the addition.

Loading content...

Implementations on Foreign Types

impl<N: Unary> Add for (N, Z)[src]

type Result = N

impl<N: Unary, M: Unary> Add for (N, S<M>) where
    (N, M): Add
[src]

type Result = S<<(N, M) as Add>::Result>

Loading content...

Implementors

Loading content...