1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

uniform_int_distribution 追加

This commit is contained in:
bolero-MURAKAMI 2011-10-04 22:00:08 +09:00
parent 8e6b3d22cb
commit ded40d58ae
6 changed files with 640 additions and 12 deletions

View file

@ -0,0 +1,23 @@
#ifndef SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP
#define SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP
#include <cstddef>
#include <limits>
#include <sprout/config.hpp>
namespace sprout {
namespace random {
namespace detail {
template<typename URNG>
struct generator_bits {
public:
static SPROUT_CONSTEXPR std::size_t value() {
return std::numeric_limits<typename URNG::result_type>::digits;
}
};
} // namespace detail
} // namespace random
} // namespace sprout
#endif // #ifndef SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP