Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-10-24 12:48:47


"Andy Little" <andy_at_[hidden]> writes:

>>>>> "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?
>>
>> Hmm, is that meant to be a question?
>
> As it stands in both my and Cromwells version the numerator and
> denominator are those of the (so-called) normalized version. This
> was carried over from the runtime version by Matthias Schabel in his
> original compile-time rational. IOW to the compile time rational
> veterans thats how its always been and we thought it worked
> fine. The rationale is that rational is primarily a math entity,
> whereas integral can be used as an id and for counting, iterating
> etc. So the question is do you think they should rather be typedefs
> for the input parameters?
>
> As it stands these two typedefs are normalized versions of the Numerator and
> Denominator parameters.

If you're trying to save cycles at compilation time by normalizing
lazily, then of course the numerator and denominator typedefs can't be
normalized. So, sure, typedefs for the template arguments sound fine
to me.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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