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.