add algorithm clamp, clamp_range_copy, clamp_range

This commit is contained in:
bolero-MURAKAMI 2012-10-13 21:06:32 +09:00
parent de41f5c880
commit 79ea4f0885
29 changed files with 870 additions and 11 deletions

View file

@ -14,7 +14,7 @@ namespace sprout {
inline SPROUT_CONSTEXPR ForwardIterator
adjacent_find(ForwardIterator first, ForwardIterator last, BinaryPredicate pred) {
return first == last || sprout::next(first) == last ? last
: pred(*first, *(sprout::next(first))) != false ? first
: pred(*first, *(sprout::next(first))) ? first
: sprout::adjacent_find(sprout::next(first), last, pred)
;
}