Noticed by @danston in #5937. Boost's number::compare is implemented by converting the argument to number, so it doesn't support infinities (it wouldn't return something very useful for I(2).compare(2.3) either). This will likely be fixed by dropping this implementation of to_interval in favor of a new one, but it seems useful to track this bug.
Source Code
#include <CGAL/boost_mp.h>
typedef boost::multiprecision::cpp_int I;
int main(){
I i = 1;
i <<= 10000;
CGAL::to_interval(i);
}
terminate called after throwing an instance of 'boost::wrapexcept<std::runtime_error>'
what(): Cannot convert a non-finite number to an integer.
Issue Details
Noticed by @danston in #5937. Boost's
number::compare
is implemented by converting the argument tonumber
, so it doesn't support infinities (it wouldn't return something very useful forI(2).compare(2.3)
either). This will likely be fixed by dropping this implementation of to_interval in favor of a new one, but it seems useful to track this bug.Source Code