generator_bits.hpp 874 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* boost random/detail/generator_bits.hpp header file
  2. *
  3. * Copyright Steven Watanabe 2011
  4. * Distributed under the Boost Software License, Version 1.0. (See
  5. * accompanying file LICENSE_1_0.txt or copy at
  6. * http://www.boost.org/LICENSE_1_0.txt)
  7. *
  8. * See http://www.boost.org for most recent version including documentation.
  9. *
  10. * $Id$
  11. *
  12. */
  13. #ifndef BOOST_RANDOM_DETAIL_GENERATOR_BITS_HPP
  14. #define BOOST_RANDOM_DETAIL_GENERATOR_BITS_HPP
  15. #include <boost/limits.hpp>
  16. namespace boost {
  17. namespace random {
  18. namespace detail {
  19. // This is a temporary measure that retains backwards
  20. // compatibility.
  21. template<class URNG>
  22. struct generator_bits {
  23. static std::size_t value() {
  24. return std::numeric_limits<typename URNG::result_type>::digits;
  25. }
  26. };
  27. } // namespace detail
  28. } // namespace random
  29. } // namespace boost
  30. #endif // BOOST_RANDOM_DETAIL_GENERATOR_BITS_HPP