
----- Original Message ----- From: "joel falcou" <joel.falcou@lri.fr> To: <boost-users@lists.boost.org> Sent: Sunday, June 20, 2010 12:10 PM Subject: Re: [Boost-users] [boost] [chrono] v0.4.1 + thread_clock implementation on Windows
vicente.botet wrote:
What do you mean by a "real MPL arithmetic types " I'm aware of mpl integral constants, but I don't know other that can be used as arithmetic constants. What a re the requirements for these MPL arithmetic types? Could you elaborate?
MPL arithmetic types should model the MPL Integral Constant concepts as specified here:
http://www.boost.org/doc/libs/1_43_0/libs/mpl/doc/refmanual/integral-constan...
the idea is just to have your rational type being usable like:
boost::mpl::plus<R1,R2>::type
instead of using ratio_plus etc...
Joel, arithmetic and integral are not the same thing for me. I don't see how I can make ratio be a model of a MPL Integral constant as ratio is not integral, value_type can not be defined, there is no next, nor prior. Am I missing something? Are you suggesting that I write an specialization of boost::mpl::plus for ratio? Thanks, Vicente