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:
parent
8e6b3d22cb
commit
ded40d58ae
6 changed files with 640 additions and 12 deletions
23
sprout/random/detail/generator_bits.hpp
Normal file
23
sprout/random/detail/generator_bits.hpp
Normal 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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue