|
Boost : |
Subject: Re: [boost] [math] common_factor template parameters
From: John Maddock (boost.regex_at_[hidden])
Date: 2010-06-27 12:17:33
>>>static_gcc and static_lcm have unsigned long parameters.
>>>
>>>template < unsigned long Value1, unsigned long Value2 >
>>>struct boost::math::static_gcd;
>>>
>>>Could these be changed to uintmax_t?
>>
>> I would think so yes.
>
> Do you need I make a ticket?
Well... it might prevent me from forgetting! ;-)
> Murillo, a GSOC student, is working on some metafunctions for integers
> including between others abs and sign.
> What do you think about a MPL integral constant metafunction having as
> parameters integral constant types on top of static_lcm?
>
> namespace XXX {
>
> template <typename ICT1, typename ICT2>
> lcm : mpl::integral_c<uintmax_t,
> static_lcm<
> XXX::abs<ICT1>::value,
> XXX::abs<ICT1>::value
> >
> > {};
> }
>
> Should these metafunctions be added to the 'mpl' namespace? if not what
> could be the a good name for XXX?
No idea, but they look like mpl metafunctions. I guess if the mpl guys
don't want them then Boost.Math could host them, it's really a question of
where users are mostly likely to go looking for them. I'm not sure what the
answer to is though...
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk