Macro dimensioned::tarr
source · [−]macro_rules! tarr {
() => { ... };
($n:ty) => { ... };
($n:ty,) => { ... };
($n:ty, $($tail:ty),+) => { ... };
($n:ty, $($tail:ty),+,) => { ... };
}
Expand description
Construct a type-level array of type-level integers
Example
#[macro_use]
extern crate dimensioned as dim;
#[macro_use]
extern crate generic_array;
use dim::typenum::consts::*;
type TArr = tarr![P3, P2, N5, N8, P2];
fn main() {
use dim::array::ToGA;
let x = TArr::to_ga();
let y = arr![isize; 3, 2, -5, -8, 2];
assert_eq!(x, y);
}