1
0
Fork 0
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:
bolero-MURAKAMI 2012-11-24 15:57:50 +09:00
parent cc4ade67fd
commit 05f75bef27
19 changed files with 289 additions and 13 deletions

View file

@ -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_;
}
};