mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-04 14:14:09 +00:00
add algorithm clamp, clamp_range_copy, clamp_range
This commit is contained in:
parent
de41f5c880
commit
79ea4f0885
29 changed files with 870 additions and 11 deletions
|
@ -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)
|
||||
;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue