dimensioned::dim_impl_binary!
[−]
[src]
macro_rules! dim_impl_binary { ($Trait:ident, $fun:ident, $op:ident, $In:ty => $Out:ty) => ( pub trait $Trait<RHS> { type Output; fn $fun(self, rhs: RHS) -> Self::Output; } impl<Dl, Dr> $Trait<Dim<Dr, $In>> for Dim<Dl, $In> where Dl: Dimension + $op<Dr>, Dr: Dimension, <Dl as $op<Dr>>::Output: Dimension { type Output = Dim<<Dl as $op<Dr>>::Output, $Out>; fn $fun(self, rhs: Dim<Dr, $In>) -> Self::Output { Dim::new( (self.0).$fun(rhs.0) ) } } ); }