mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix generator
This commit is contained in:
parent
74e0c8acd6
commit
ba3d7d74b0
5 changed files with 79 additions and 109 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue