mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
support Generator Requirement: generator_iterator, random_redult
This commit is contained in:
parent
9f11b2481d
commit
e0629a21ce
2 changed files with 15 additions and 0 deletions
|
@ -114,6 +114,12 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR distribution_type const& distribution() const SPROUT_NOEXCEPT {
|
||||
return distribution_;
|
||||
}
|
||||
SPROUT_CXX14_CONSTEXPR operator result_type&() SPROUT_NOEXCEPT {
|
||||
return generated_value();
|
||||
}
|
||||
SPROUT_CONSTEXPR operator result_type const&() const SPROUT_NOEXCEPT {
|
||||
return generated_value();
|
||||
}
|
||||
SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT {
|
||||
return distribution_.min();
|
||||
}
|
||||
|
@ -233,6 +239,12 @@ namespace sprout {
|
|||
SPROUT_CONSTEXPR random_result const& next_generator() const SPROUT_NOEXCEPT {
|
||||
return *this;
|
||||
}
|
||||
SPROUT_CXX14_CONSTEXPR operator result_type&() SPROUT_NOEXCEPT {
|
||||
return generated_value();
|
||||
}
|
||||
SPROUT_CONSTEXPR operator result_type const&() const SPROUT_NOEXCEPT {
|
||||
return generated_value();
|
||||
}
|
||||
SPROUT_CONSTEXPR result_type min() const SPROUT_NOEXCEPT {
|
||||
return engine_.min();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue