id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8272,BOOST_REQUIRE_CLOSE fails to compile with boost::multiprecision::cpp_dec_float_100,Ken Smith ,Gennadiy Rozental,"Environment: - Linux 3.7.9-2-ARCH - G++ 4.7.2 - Issue reproduces with Boost SVN trunk This code: {{{ #define BOOST_TEST_MAIN #include #include #include BOOST_AUTO_TEST_CASE(multiprecision_closeness) { using num_t = boost::multiprecision::cpp_dec_float_100; num_t a(""1.0000000000000000000000000000001""); num_t b(1); num_t thresh(1e-15); BOOST_REQUIRE_CLOSE(a, b, thresh); } }}} Generates the following compilation error: {{{ g++ -std=gnu++11 -g -Iboost-trunk -o prog repro.cpp In file included from boost-trunk/boost/test/tools/old/impl.hpp:21:0, from boost-trunk/boost/test/test_tools.hpp:32, from boost-trunk/boost/test/impl/exception_safety.ipp:35, from boost-trunk/boost/test/included/unit_test.hpp:22, from repro.cpp:2: boost-trunk/boost/test/tools/floating_point_comparison.hpp: In instantiation of ‘FPT boost::math::fpc::fpc_detail::fpt_abs(FPT) [with FPT = boost::multiprecision::detail::expression >, boost::multiprecision::number >, void, void>]’: boost-trunk/boost/test/tools/floating_point_comparison.hpp:207:67: required from ‘bool boost::math::fpc::close_at_tolerance::operator()(FPT, FPT) const [with FPT = boost::multiprecision::number >]’ boost-trunk/boost/test/tools/old/impl.hpp:292:50: required from ‘boost::test_tools::assertion_result boost::test_tools::check_is_close_t::operator()(FPT1, FPT2, ToleranceType) const [with FPT1 = boost::multiprecision::number >; FPT2 = boost::multiprecision::number >; ToleranceType = boost::math::fpc::percent_tolerance_t > >]’ boost-trunk/boost/test/tools/old/impl.hpp:91:1: required from ‘bool boost::test_tools::tt_detail::check_frwd(Pred, const boost::unit_test::lazy_ostream&, boost::unit_test::const_string, std::size_t, boost::test_tools::tt_detail::tool_level, boost::test_tools::tt_detail::check_type, const Arg0&, const char*, const Arg1&, const char*, const Arg2&, const char*) [with Pred = boost::test_tools::check_is_close_t; Arg0 = boost::multiprecision::number >; Arg1 = boost::multiprecision::number >; Arg2 = boost::math::fpc::percent_tolerance_t > >; boost::unit_test::const_string = boost::unit_test::basic_cstring; std::size_t = long unsigned int]’ repro.cpp:14:1: required from here boost-trunk/boost/test/tools/floating_point_comparison.hpp:59:47: error: no matching function for call to ‘boost::multiprecision::detail::expression >, boost::multiprecision::number >, void, void>::expression(int)’ boost-trunk/boost/test/tools/floating_point_comparison.hpp:59:47: note: candidates are: In file included from boost-trunk/boost/multiprecision/detail/default_ops.hpp:10:0, from boost-trunk/boost/multiprecision/detail/generic_interconvert.hpp:9, from boost-trunk/boost/multiprecision/number.hpp:22, from boost-trunk/boost/multiprecision/cpp_dec_float.hpp:28, from repro.cpp:4: boost-trunk/boost/multiprecision/detail/number_base.hpp:379:4: note: boost::multiprecision::detail::expression::expression(const Arg1&, const Arg2&) [with tag = boost::multiprecision::detail::subtract_immediates; Arg1 = boost::multiprecision::number >; Arg2 = boost::multiprecision::number >] boost-trunk/boost/multiprecision/detail/number_base.hpp:379:4: note: candidate expects 2 arguments, 1 provided boost-trunk/boost/multiprecision/detail/number_base.hpp:369:8: note: constexpr boost::multiprecision::detail::expression >, boost::multiprecision::number >, void, void>::expression(const boost::multiprecision::detail::expression >, boost::multiprecision::number >, void, void>&) boost-trunk/boost/multiprecision/detail/number_base.hpp:369:8: note: no known conversion for argument 1 from ‘int’ to ‘const boost::multiprecision::detail::expression >, boost::multiprecision::number >, void, void>&’ make: *** [prog] Error 1 }}} At line 59 of floating_point_comparison.hpp, FPT appears to be an expression template and doesn't suffer the static cast.",Bugs,closed,Boost 1.59.0,test,Boost 1.53.0,Problem,fixed,test multiprecision check_is_close is_close_to,pbristow@…