$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Andy Little (andy_at_[hidden])
Date: 2005-02-28 06:51:23
Hi All,
What is the current status of compile time fractions / rationals?
Various directions are
1 Alexei Gurovois in boost/mpl/math/rational_c.hpp
2 Cromwell Enages work on the files section
<http://groups.yahoo.com/group/boost/files/mpl_math.zip>
3 Hugo Duncans:
http://tinyurl.com/2qrpq
However the three are not compatible with each other
In Cromwells (named fraction_c) and Hugo Duncans the numerator and
denominator are mpl Integral Constants not values, as in Alexeis original.
mpl::rational_c<int,1,2>::denominator; // == 2
against
mpl::rational_c<int,1,2>::denominator::value; == 2
Cromwell's version is not a nullary_metafunction whereas Hugo Duncans
and Alexeis are. This is the right thing IMO because the type can be reduced
eg 2/2 ---> 1,
Also see
http://listarchives.boost.org/MailArchives/boost-users/msg06245.php
I appreciate that there my be advantages to Cromwells and Hugo Duncans
versions.. Ultimately either the version in the release should be removed/
modified or 'lived with'.
Anyone have any thoughts. And is anyone still working on this?
regards
Andy Little