Boost logo

Boost :

Subject: Re: [boost] [ratio] Assignation between equivalent ratios
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-12-07 12:48:41


----- Original Message -----
From: "Howard Hinnant" <howard.hinnant_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, December 07, 2009 3:18 PM
Subject: Re: [boost] [ratio] Assignation between equivalent ratios

>
> On Dec 7, 2009, at 6:44 AM, vicente.botet wrote:
>
>> Hi,
>>
>> do you think it is worth considering a ratio generator that will ensure a normalized ratio. In thi way
>>
>> ratio_normalizer<1,3>::type will be the same as ratio_normalizer<3,9>::type. So no need to add the copy constructors and assignement operators.
>
> If we want to do this, I suspect the easiest thing would be to make type a nested typedef of ratio itself:
>
> ratio<3,9>::type is ratio<1,3>
>

Yes, this looks simple and avoid the normaliZer linguistic issue :).

Best,
Vicente


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