id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 13577,rational_adaptor does not compile with fixed width cpp_int,jgarber1@…,John Maddock,"Hello, I am trying to use the `rational_adaptor` class with a 128-bit `cpp_int` as a fixed-width alternative to `cpp_rational`. However, attempting to do so results in a compiler error. {{{ #include using namespace boost::multiprecision; using Rational = number>>; int main() { Rational x = 3; x /= 2; } }}} Compiling this program (Clang, Mac 10.12, Boost 1.67) results in the following error {{{ /usr/local/include/boost/multiprecision/rational_adaptor.hpp:268:11: error: no matching function for call to 'eval_is_zero' return eval_is_zero(val.data().numerator().backend()); ^~~~~~~~~~~~ /usr/local/include/boost/multiprecision/rational_adaptor.hpp:230:7: note: in instantiation of function template specialization 'boost::multiprecision::backends::eval_is_zero >' requested here if(eval_is_zero(o)) ^ /usr/local/include/boost/multiprecision/detail/default_ops.hpp:154:4: note: in instantiation of function template specialization 'boost::multiprecision::backends::eval_divide >' requested here eval_divide(result, t); ^ /usr/local/include/boost/multiprecision/number.hpp:447:7: note: in instantiation of function template specialization 'boost::multiprecision::default_ops::eval_divide >, int>' requested here eval_divide(m_backend, canonical_value(v)); ^ bug2.cpp:9:7: note: in instantiation of function template specialization 'boost::multiprecision::number >, boost::multiprecision::expression_template_option::et_off>::operator/=' requested here x /= 2; ^ /usr/local/include/boost/multiprecision/rational_adaptor.hpp:266:13: note: candidate template ignored: could not match 'rational_adaptor' against 'cpp_int_backend' inline bool eval_is_zero(const rational_adaptor& val) ^ /usr/local/include/boost/multiprecision/cpp_int/misc.hpp:155:4: note: candidate template ignored: substitution failure [with MinBits1 = 128, MaxBits1 = 128, SignType1 = boost::multiprecision::cpp_integer_type::signed_magnitude, Checked1 = boost::multiprecision::cpp_int_check_type::checked, Allocator1 = void]: no type named 'type' in 'boost::enable_if_c' eval_is_zero(const cpp_int_backend& val) BOOST_NOEXCEPT ^ 1 error generated. }}} Is the `rational_adaptor` class intended for use with fixed-width integers, or just arbitrary precision ones? Thank you",Bugs,closed,To Be Determined,multiprecision,Boost 1.67.0,Problem,fixed,,