
Boost : 
Subject: Re: [boost] [MPL.Math] ratio
From: Matthias Schabel (boost_at_[hidden])
Date: 20081113 13:04:03
> 20.3 in N2798 is very stable, since except for the diff markup it is
> the same as the Committee Draft that is currently being reviewed by
> national bodies, and there are no outstanding issues in the LWG active
> issues list.
Why the ugly (and pointless) ratio_multiply? Shouldn't there just be a
standard template for
multiplication? This can then be specialized as needed for any types
that can be multiplied
at compile time, which facilitates code such as used in the
Boost.Units library where the result
type of multiplication of two units takes into account the possibility
that the type of the product
of two other types is different. As far as I can tell, all having a
special set of arithmetic operators
of ratios does is necessitate the use of another layer of indirection.
Maybe I'm missing some
clear benefit?
I think what Cromwell is talking about is coming up with extensions to
MPL to do compiletime
mathematical operations, which would be neat. Steven came up with a
basic compiletime
linear solver for Boost.Units, but it would be extremely cool to have
this functionality abstracted
out into a more general library...
Matthias
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk