Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2005-10-23 08:48:43


"David Abrahams" wrote
> "Andy Little" writes:
>
>> I am arguing for a normalised version, so for my_rational<2,8>,
>> my_rational<3,12> and my_rational<5,20> among others, the normalised
>> version
>> is my_rational<1,4> and thats what I think rational<...>::type should return.
>
> Why should that normalization be done eagerly? I can see no good
> reason for it.

Numerator and denominator members are evaluated already . I guess you could
remove them....

[cut]

> Is it daft to want my_rational<x,1> to be a conforming MPL integral
> constant?

Who wants special cases? integral constant can be converted to a rational
constant , but not necessarily the other way. numerator<T> and denominator<T>
functions are provided for integration with integral constants.

regards
Andy Little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk