Boost logo

Boost :

Subject: Re: [boost] [MPL.Math] ratio
From: Cromwell Enage (sponage_at_[hidden])
Date: 2008-11-13 15:18:01


--- On Thu, 11/13/08, Beman Dawes <bdawes_at_[hidden]> wrote:
> The latest WP is N2798. See
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf

Got it.

> > I just noticed section 20.3, called "compile-time rational
> > arithmetic", and I'm wondering how stable that specification is.
>
> 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.

Hmmm. I see that the ratio class template is neither required nor implemented as a nullary metafunction, as std::integral_constant is. (There is no "typedef ratio<N,D> type;" statement.) Is there any particular reason? I ask because this may cause problems if I try to have the ratio interact with other MPL metafunctions.

> > I'm also wondering whether or not anyone else has been working on
> > an implementation.
>
> See the <boost/ratio.hpp> header that is part of the Chrono library
> added to the sandbox yesterday.
>
> Checkout http://svn.boost.org/svn/boost/sandbox/chrono with
> Subversion.

Got it.

> > In the meantime, my questions are:
> > * Should I resume work on MPL.Math? Should I make a different
> > branch, still part of MPL? Or should I fork a separate Boost
> > project altogether?
> > * If I resume work, should I make the implementation more
> > standards-conformant?
>
> Sorry, I'm not familiar with the MPL.Math work you are referring to.

My bad, I should have clarified. It's a generalized compile-time math library, available from the BoostPro Computing Vault, inside the Template Metaprogramming folder. It needs documentation, though.

> Perhaps look at the Chrono <boost/ratio.hpp> header and see if it
> affects your thinking.

Okay, the last two options are out. :) I'll see what I can do about getting MPL.Math to play nice with boost::ratio, but as I said before, that missing type definition may cause problems.

Cheers,
Cromwell D. Enage

      


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk