mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add compost some ranges.
This commit is contained in:
parent
cc4ade67fd
commit
05f75bef27
19 changed files with 289 additions and 13 deletions
|
@ -30,7 +30,7 @@ namespace sprout {
|
|||
: pred_(pred)
|
||||
, new_(new_value)
|
||||
{}
|
||||
SPROUT_CONSTEXPR T const& operator()(T const& value) const {
|
||||
SPROUT_CONSTEXPR T operator()(T const& value) const {
|
||||
return pred_(value) ? new_ : value;
|
||||
}
|
||||
};
|
||||
|
@ -86,10 +86,10 @@ namespace sprout {
|
|||
: pred_(pred)
|
||||
, new_(new_value)
|
||||
{}
|
||||
SPROUT_CONSTEXPR predicate_type predicate() const {
|
||||
SPROUT_CONSTEXPR predicate_type const& predicate() const {
|
||||
return pred_;
|
||||
}
|
||||
SPROUT_CONSTEXPR value_type new_value() const {
|
||||
SPROUT_CONSTEXPR value_type const& new_value() const {
|
||||
return new_;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue