Boost logo

Boost :

Subject: Re: [boost] [rational] Can the community maintenance team and/or rational users please review some pull requests?
From: John Maddock (jz.maddock_at_[hidden])
Date: 2015-04-01 08:40:42


> That is incorrect rational is (inadvertently) constructible from double.
> Check it out (with 1.57):
>
> #include <boost/rational.hpp>
>
> int main()
> {
> boost::rational<int> r = 2.5;
> assert (boost::rational<int>(2) == r);
> }
>
> With an unfortunate results. This is a serious bug.

Correct: that is the whole point of this proposed change - to fix that bug.

John.


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