Sprout/sprout/random/detail/generator_bits.hpp

30 lines
1,015 B
C++
Raw Normal View History

2013-08-08 09:54:33 +00:00
/*=============================================================================
2016-02-25 09:48:28 +00:00
Copyright (c) 2011-2016 Bolero MURAKAMI
2013-08-08 09:54:33 +00:00
https://github.com/bolero-MURAKAMI/Sprout
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
2011-10-04 13:00:08 +00:00
#ifndef SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP
#define SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP
#include <sprout/config.hpp>
#include <sprout/workaround/std/cstddef.hpp>
2013-08-06 15:15:09 +00:00
#include <sprout/limits.hpp>
2011-10-04 13:00:08 +00:00
namespace sprout {
namespace random {
namespace detail {
template<typename URNG>
struct generator_bits {
public:
static SPROUT_CONSTEXPR std::size_t value() {
2013-08-06 15:15:09 +00:00
return sprout::numeric_limits<typename URNG::result_type>::digits;
2011-10-04 13:00:08 +00:00
}
};
} // namespace detail
} // namespace random
} // namespace sprout
2013-03-22 05:24:19 +00:00
#endif // #ifndef SPROUT_RANDOM_DETAIL_GENERATOR_BITS_HPP