13 #if !defined(RANDOMLIB_RANDOMTYPE_HPP)
14 #define RANDOMLIB_RANDOMTYPE_HPP 1
31 template<
int bits,
typename UIntType>
41 static const unsigned width = bits;
46 ~
type(0) >> (std::numeric_limits<type>::digits - width);
54 static const type max = mask;
62 template<
typename IntType>
static type cast(IntType x)
throw()
63 {
return type(x) & mask; }
71 static void Read32(std::istream& is,
bool bin, type& x);
84 static void Write32(std::ostream& os,
bool bin,
int& cnt, type x);
93 static void CheckSum(type n, uint32_t& check)
throw();
109 #if defined(_MSC_VER) && _MSC_VER >= 1600
137 #endif // RANDOMLIB_RANDOMTYPE_HPP
unsigned long bitset_uint_t
Class to hold bit-width and unsigned type.
RandomType< 32, uint32_t > Random_u32
static void CheckSum(type n, uint32_t &check)
RandomType< 64, uint64_t > Random_u64
static type cast(IntType x)