Boost logo

Boost :

Subject: Re: [boost] [ratio][mpl] static metafunctions
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2011-01-14 13:47:35


----- Original Message -----
From: "vicente.botet" <vicente.botet_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, January 01, 2011 9:27 PM
Subject: Re: [boost] [ratio][mpl] static metafunctions

> ----- Original Message -----
> From: "Aleksey Gurtovoy" <agurtovoy_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Friday, December 31, 2010 7:06 AM
> Subject: Re: [boost] [ratio][mpl] static metafunctions
>
>
>> On Thu, 30 Dec 2010 15:52:58 -0600, Dave Abrahams <dave_at_[hidden]>
>> wrote:
>>
>>> At Thu, 30 Dec 2010 22:45:12 +0100,
>>> vicente.botet wrote:
>>>>
>>>> [1 <text/plain; iso-8859-1 (quoted-printable)>]
>>>> Hi,
>>>>
>>>> during the Boost.Ratio review as requested to push some of the static
>>>> integer metafunctions as static_abs, static_sign, static_gcd,
>>>> static_lcm to a public library.
>>>>
>>>> At the begining I has the impression that these functions should be
>>>> added to Boost.Integer or Boost.Math, but after reflexion I think that
>>>> these static metafunctions could be better integrated into Boost.MPL
>>>> with the existing integral functions. I have prepared a patch for 3 of
>>>> them.
>>>>
>>>> Do you think that these can be added to Boost.MPL if I provide the
>>>> needed documentation and tests?
>>>>
>>>
>>> Looks good to me. Aleksey?
>>
>> I'd drop BOOST_MPL_CFG_MSVC_ETI_BUG workarounds since they are only
>> relevant for MSVC < 7.1, otherwise yes, I will be happy to accept this
>> (with tests and docs :).
>
> I have added the modified files on https://svn.boost.org/svn/boost/sandbox/chrono/boost/mpl/ and https://svn.boost.org/svn/boost/sandbox/chrono/libs/mpl/
>
> I've found useful to add the associated _c meta-functions, so we can request for gcd_c<int, 10, 6, 4> instead of gcd<int_<10>,int_<6>, int_<4>>. Let me know if you agree with this addition and if it is good to add them in the same file.
>
> For the moment I have documented variadic metafunctions for gcd and lcm, but I have not yet take the time to understand how the variadic part is done for other arithmetic operations and if I can use it. I'm sure some of the maintainers could make the needed modifications quite quikly. If this is not the case I will change the documentation until I get the variadic implementation.

Hi,

I would like to know if some of you are working on this or if I need to do something myself.

Thanks,
Vicente


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