#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 {
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;
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;
}
} 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;
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>