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

fix generator

This commit is contained in:
bolero-MURAKAMI 2013-04-22 13:35:01 +09:00
parent 74e0c8acd6
commit ba3d7d74b0
5 changed files with 79 additions and 109 deletions

View file

@ -7,6 +7,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/iterator/next.hpp>
#include <sprout/generator.hpp>
#include <sprout/utility/swap.hpp>
namespace sprout {
@ -284,34 +285,6 @@ namespace sprout {
iterator_next(sprout::random::random_result<Engine, Distribution> const& it) {
return it();
}
//
// generated_value
//
template<typename Engine, typename Distribution>
inline typename sprout::random::random_result<Engine, Distribution>::result_type&
generated_value(sprout::random::random_result<Engine, Distribution>& t) {
return t.generated_value();
}
template<typename Engine, typename Distribution>
inline SPROUT_CONSTEXPR typename sprout::random::random_result<Engine, Distribution>::result_type const&
generated_value(sprout::random::random_result<Engine, Distribution> const& t) {
return t.generated_value();
}
//
// next_generator
//
template<typename Engine, typename Distribution>
inline typename sprout::random::random_result<Engine, Distribution>&
next_generator(sprout::random::random_result<Engine, Distribution>& t) {
return t.next_generator();
}
template<typename Engine, typename Distribution>
inline SPROUT_CONSTEXPR typename sprout::random::random_result<Engine, Distribution> const&
next_generator(sprout::random::random_result<Engine, Distribution> const& t) {
return t.next_generator();
}
} // namespace random
using sprout::random::random_result;