Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2005-10-22 18:31:59

"Cromwell Enage" wrote

> Actually, the only thing
> BOOST_MPL_AUX_SELF_TYPEDEF(name) does is expand to
> typedef name type;
> or
> typedef struct name type;
> depending on whether a particular non-conforming
> compiler needs the second statement. No reliance on
> input parameters, AFAICT.

Yeah Right.................... ;-)

'name' which is "rational" in class template "rational" is an alias in class
scope for 'name'<input_parameters>. What this is really about is potatoes and
potatoes. So it is reliant on input parameters.

I am arguing for a normalised version, so for my_rational<2,8>,
my_rational<3,12> and my_rational<5,20> among others, the normalised version
is my_rational<1,4> and thats what I think rational<...>::type should return.

>> Secondly, are the next and prior members necessary?
>> IMO they only make sense for integers.
> They are provided for consistency with
> Boost::Rational, which implements increment and
> decrement operators.

Just because rational does it doesnt mean its not daft... ;-)
Does anybody **seriously** use that feature of Boost.Rational?

>> Thirdly, It should be noted that there is a
>> <boost/mpl/math/rational_c.hpp>
>> header, but as rational_c is defined in
>> <boost/mpl/math/rational.hpp> I think
>> its now both redundant and confusing.
> The first file was around long before I even took an
> interest in MPL. If and when MPL.Math is merged into
> Boost, we'll ask Aleksey to remove the old file.

Mpl. Math seems to be getting quite popular.... ;-)

Andy little

Boost list run by bdawes at, gregod at, cpdaniel at, john at