
Boost : 
From: Andy Little (andy_at_[hidden])
Date: 20051023 10:22:34
"David Abrahams" wrote
> "Andy Little" writes:
> I don't see what the presence of numerator and denominator has to do
> with normalization.
They should be typedefs for the input parameters?
[cut]
>>> Is it daft to want my_rational<x,1> to be a conforming MPL integral
>>> constant?
>>
>> Who wants special cases?
>
> Who suggested a special case?
Whoever said , " Is it daft to want my_rational<x,1> to be a conforming MPL
integral constant?" .
>> integral constant can be converted to a
>> rational constant, but not necessarily the other way.
>
> Don't forget that the types are all known at compiletime. The usual
> runtime logic doesn't necessarily apply. A conversion from
> my_rational<x,1> to int_<x> is not a narrowing conversion.
Conversion is fine. Thats not what you said above. Actually I already use
conversions in my boosted version of my pqs library, so that user can use
integer rather than rational dimensions. It works fine.
cheers
Andy Little
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk