Index: boost/random/uniform_int.hpp =================================================================== --- boost/random/uniform_int.hpp (revision 46390) +++ boost/random/uniform_int.hpp (working copy) @@ -25,6 +25,7 @@ #include #include #include +#include #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS #include #endif @@ -38,7 +39,7 @@ public: typedef IntType input_type; typedef IntType result_type; - typedef typename random::detail::make_unsigned::type range_type; + typedef typename make_unsigned::type range_type; explicit uniform_int(IntType min_arg = 0, IntType max_arg = 9) : _min(min_arg), _max(max_arg) @@ -61,7 +62,7 @@ { typedef typename Engine::result_type base_result; // ranges are always unsigned - typedef typename random::detail::make_unsigned::type base_unsigned; + typedef typename make_unsigned::type base_unsigned; const base_result bmin = (eng.min)(); const base_unsigned brange = random::detail::subtract()((eng.max)(), (eng.min)()); Index: boost/random/detail/signed_unsigned_tools.hpp =================================================================== --- boost/random/detail/signed_unsigned_tools.hpp (revision 46390) +++ boost/random/detail/signed_unsigned_tools.hpp (working copy) @@ -13,88 +13,13 @@ #include #include +#include namespace boost { namespace random { namespace detail { -/* - * Given an (integral) type T, returns the type "unsigned T". - * (type_traits appears to be lacking the feature) - */ -template -struct make_unsigned { }; - -template<> -struct make_unsigned -{ - typedef unsigned char type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned char type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned char type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned short type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned short type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned int type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned int type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned long type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned long type; -}; - -#ifdef BOOST_HAS_LONG_LONG -template<> -struct make_unsigned -{ - typedef unsigned long long type; -}; - -template<> -struct make_unsigned -{ - typedef unsigned long long type; -}; -#endif - - /* * Compute x - y, we know that x >= y, return an unsigned value. */