]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/multiprecision/traits/is_restricted_conversion.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / multiprecision / traits / is_restricted_conversion.hpp
index a7ad610f921c0570356f1f814b45faaea8bc9688..2a8ebe20544c56a94de889ad55c89ac37c6582cf 100644 (file)
@@ -8,7 +8,6 @@
 #define BOOST_MP_RESTRICTED_CONVERSION_HPP
 
 #include <boost/multiprecision/traits/explicit_conversion.hpp>
-#include <boost/mpl/if.hpp>
 #include <boost/multiprecision/detail/number_base.hpp>
 
 namespace boost { namespace multiprecision { namespace detail {
@@ -16,23 +15,23 @@ namespace boost { namespace multiprecision { namespace detail {
 template <class From, class To>
 struct is_lossy_conversion
 {
-   typedef typename mpl::if_c<
+   using type = typename std::conditional<
        ((number_category<From>::value == number_kind_floating_point) && (number_category<To>::value == number_kind_integer))
            /* || ((number_category<From>::value == number_kind_floating_point) && (number_category<To>::value == number_kind_rational))*/
            || ((number_category<From>::value == number_kind_rational) && (number_category<To>::value == number_kind_integer)) || ((number_category<From>::value == number_kind_fixed_point) && (number_category<To>::value == number_kind_integer)) || (number_category<From>::value == number_kind_unknown) || (number_category<To>::value == number_kind_unknown),
-       mpl::true_,
-       mpl::false_>::type type;
-   static const bool      value = type::value;
+       std::integral_constant<bool, true>,
+       std::integral_constant<bool, false>>::type;
+   static constexpr const bool                     value = type::value;
 };
 
 template <typename From, typename To>
 struct is_restricted_conversion
 {
-   typedef typename mpl::if_c<
-       ((is_explicitly_convertible<From, To>::value && !is_convertible<From, To>::value) || is_lossy_conversion<From, To>::value),
-       mpl::true_,
-       mpl::false_>::type type;
-   static const bool      value = type::value;
+   using type = typename std::conditional<
+       ((is_explicitly_convertible<From, To>::value && !std::is_convertible<From, To>::value) || is_lossy_conversion<From, To>::value),
+       std::integral_constant<bool, true>,
+       std::integral_constant<bool, false>>::type;
+   static constexpr const bool                     value = type::value;
 };
 
 }}} // namespace boost::multiprecision::detail