]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/random/uniform_int_distribution.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / random / uniform_int_distribution.hpp
index e0d3a9bebcdd1317e47f5c03119fa4ef88e3a8bf..8a3ea7b89f353aa295815b4d9b7cb68bd34cd732 100644 (file)
@@ -29,9 +29,9 @@
 #include <boost/random/detail/uniform_int_float.hpp>
 #include <boost/random/detail/signed_unsigned_tools.hpp>
 #include <boost/random/traits.hpp>
-#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/integral_constant.hpp>
 #ifdef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#include <boost/mpl/if.hpp>
+#include <boost/type_traits/conditional.hpp>
 #endif
 
 namespace boost {
@@ -49,7 +49,7 @@ namespace detail {
 template<class Engine, class T>
 T generate_uniform_int(
     Engine& eng, T min_value, T max_value,
-    boost::mpl::true_ /** is_integral<Engine::result_type> */)
+    boost::true_type /** is_integral<Engine::result_type> */)
 {
     typedef T result_type;
     typedef typename boost::random::traits::make_unsigned_or_unbounded<T>::type range_type;
@@ -167,7 +167,7 @@ T generate_uniform_int(
                 eng,
                 static_cast<range_type>(0),
                 static_cast<range_type>(range/mult),
-                boost::mpl::true_());
+                boost::true_type());
         if(std::numeric_limits<range_type>::is_bounded && ((std::numeric_limits<range_type>::max)() / mult < result_increment)) {
           // The multiplcation would overflow.  Reject immediately.
           continue;
@@ -187,7 +187,7 @@ T generate_uniform_int(
       }
     } else {                   // brange > range
 #ifdef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-      typedef typename mpl::if_c<
+      typedef typename conditional<
          std::numeric_limits<range_type>::is_specialized && std::numeric_limits<base_unsigned>::is_specialized
          && (std::numeric_limits<range_type>::digits >= std::numeric_limits<base_unsigned>::digits),
          range_type, base_unsigned>::type mixed_range_type;
@@ -234,10 +234,10 @@ T generate_uniform_int(
 template<class Engine, class T>
 inline T generate_uniform_int(
     Engine& eng, T min_value, T max_value,
-    boost::mpl::false_ /** is_integral<Engine::result_type> */)
+    boost::false_type /** is_integral<Engine::result_type> */)
 {
     uniform_int_float<Engine> wrapper(eng);
-    return generate_uniform_int(wrapper, min_value, max_value, boost::mpl::true_());
+    return generate_uniform_int(wrapper, min_value, max_value, boost::true_type());
 }
 
 template<class Engine, class T>