Boost logo

Boost Users :

From: Eric Lemings (lemings_at_[hidden])
Date: 2006-08-14 16:33:22


Hi,
 
I'm looking for a metafunction like this:
 
template <
  class N1, class D1,
  class N2, class D2 >
struct times {
  typedef ... numer;
  typedef ... denom;
};
 
N1, D1, N2, and D2 are all MPL integral constant wrappers. The numer
member of the times metafunction is the numerator N of the ratio
(preferably in reduced form) produced by (N1/D1) * (N2/D2) = (N/D).
Likewise, the denom member is the denominator D of the ratio produced
from this equation.
 
Any help greatly appreciated.
 
Thanks,
Eric.
 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net