]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/multiprecision/test/test_convert_from_cpp_bin_float.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / multiprecision / test / test_convert_from_cpp_bin_float.cpp
index 1a3651623647b8e99ac5e7dc8e1352ad43bdf651..35ed3dadebc3f1cf7bb3ea6caaa4858f6ce8583b 100644 (file)
@@ -70,7 +70,7 @@ T generate_random()
 }
 
 template <class From, class To>
-void test_convert_neg_int(From from, const boost::mpl::true_&)
+void test_convert_neg_int(From from, const std::integral_constant<bool, true>&)
 {
    from = -from;
    To t3(from);
@@ -79,12 +79,12 @@ void test_convert_neg_int(From from, const boost::mpl::true_&)
    BOOST_CHECK_EQUAL(From(trunc(from)), From(t4));
 }
 template <class From, class To>
-void test_convert_neg_int(From const&, const boost::mpl::false_&)
+void test_convert_neg_int(From const&, const std::integral_constant<bool, false>&)
 {
 }
 
 template <class From, class To>
-void test_convert_imp(boost::mpl::int_<number_kind_floating_point> const&, boost::mpl::int_<number_kind_integer> const&)
+void test_convert_imp(std::integral_constant<int, number_kind_floating_point> const&, std::integral_constant<int, number_kind_integer> const&)
 {
    for (unsigned i = 0; i < 100; ++i)
    {
@@ -93,12 +93,12 @@ void test_convert_imp(boost::mpl::int_<number_kind_floating_point> const&, boost
       To   t2 = from.template convert_to<To>();
       BOOST_CHECK_EQUAL(From(trunc(from)), From(t1));
       BOOST_CHECK_EQUAL(From(trunc(from)), From(t2));
-      test_convert_neg_int<From, To>(from, boost::mpl::bool_ < std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
+      test_convert_neg_int<From, To>(from, std::integral_constant<bool, std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
    }
 }
 
 template <class From, class To>
-void test_convert_neg_rat(From from, const boost::mpl::true_&)
+void test_convert_neg_rat(From from, const std::integral_constant<bool, true>&)
 {
    from = -from;
    To t3(from);
@@ -107,12 +107,12 @@ void test_convert_neg_rat(From from, const boost::mpl::true_&)
    BOOST_CHECK_EQUAL(From(t4), from);
 }
 template <class From, class To>
-void test_convert_rat_int(From const&, const boost::mpl::false_&)
+void test_convert_rat_int(From const&, const std::integral_constant<bool, false>&)
 {
 }
 
 template <class From, class To>
-void test_convert_imp(boost::mpl::int_<number_kind_floating_point> const&, boost::mpl::int_<number_kind_rational> const&)
+void test_convert_imp(std::integral_constant<int, number_kind_floating_point> const&, std::integral_constant<int, number_kind_rational> const&)
 {
    for (unsigned i = 0; i < 100; ++i)
    {
@@ -121,12 +121,12 @@ void test_convert_imp(boost::mpl::int_<number_kind_floating_point> const&, boost
       To   t2 = from.template convert_to<To>();
       BOOST_CHECK_EQUAL(From(t1), from);
       BOOST_CHECK_EQUAL(From(t2), from);
-      test_convert_neg_rat<From, To>(from, boost::mpl::bool_ < std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
+      test_convert_neg_rat<From, To>(from, std::integral_constant<bool, std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
    }
 }
 
 template <class From, class To>
-void test_convert_neg_float(From from, const boost::mpl::true_&)
+void test_convert_neg_float(From from, const std::integral_constant<bool, true>&)
 {
    from = -from;
    To t3(from);
@@ -137,12 +137,12 @@ void test_convert_neg_float(From from, const boost::mpl::true_&)
    BOOST_CHECK_CLOSE_FRACTION(t4, answer, tol);
 }
 template <class From, class To>
-void test_convert_neg_float(From const&, const boost::mpl::false_&)
+void test_convert_neg_float(From const&, const std::integral_constant<bool, false>&)
 {
 }
 
 template <class From, class To>
-void test_convert_imp(boost::mpl::int_<number_kind_floating_point> const&, boost::mpl::int_<number_kind_floating_point> const&)
+void test_convert_imp(std::integral_constant<int, number_kind_floating_point> const&, std::integral_constant<int, number_kind_floating_point> const&)
 {
    for (unsigned i = 0; i < 100; ++i)
    {
@@ -153,7 +153,7 @@ void test_convert_imp(boost::mpl::int_<number_kind_floating_point> const&, boost
       To   tol = (std::max)(std::numeric_limits<To>::epsilon(), To(std::numeric_limits<From>::epsilon())) * 2;
       BOOST_CHECK_CLOSE_FRACTION(t1, answer, tol);
       BOOST_CHECK_CLOSE_FRACTION(t2, answer, tol);
-      test_convert_neg_float<From, To>(from, boost::mpl::bool_ < std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
+      test_convert_neg_float<From, To>(from, std::integral_constant<bool, std::numeric_limits<From>::is_signed && std::numeric_limits<To>::is_signed > ());
    }
 }