|
Boost : |
From: Cromwell Enage (sponage_at_[hidden])
Date: 2005-10-22 16:29:30
--- Andy Little wrote:
> Hi Cromwell,
Hey, Andy.
> in <boost/mpl/math/rational.hpp>
>
> In the definition for mpl::math::rational would it
> not be better to make the
> nested type member using the numerator and
> denominator rather than the input
> parameters.eg for:
>
> typedef
> rational<integral_c_<int,2>,integral_c<int,8>
> >::type type;
>
> currently type is a
>
> rational<integral_c_<int,2>,integral_c<int,8> >
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.
> 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.
> 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.
Cromwell D. Enage
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk