3 template < int I1, int I2 >
7 typedef unit<I1,I2> my_type;
10 unit( const unit<I1,I2>& ) {}
12 template< int Q1, int Q2 >
13 unit< I1 + Q1, I2 + Q2 > operator * ( const unit< Q1, Q2 >& rhs ) const {
14 return unit< I1 + Q1, I2 + Q2 >();
17 template< int Q1, int Q2 >
18 unit< I1 - Q1, I2 - Q2 > operator / ( const unit< Q1, Q2 >& rhs ) const {
19 return unit< I1 - Q1, I2 - Q2 >();
23 // specialization added to first test
28 typedef unit<0,0> my_type;
32 friend unit<0,0> operator*( const unit<0,0>& lhs, const unit<0,0>& rhs ) {
35 friend unit<0,0> operator/( const unit<0,0>& lhs, const unit<0,0>& rhs ) {
47 unit<-1,0> u3( u1 / u2 );
48 unit< 3,0> u4( u1 * u2 );