mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-02 14:04:20 +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
|
@ -21,7 +21,7 @@ namespace sprout {
|
|||
template<typename InputIterator1, typename InputIterator2, typename BinaryPredicate>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<InputIterator1, InputIterator2>
|
||||
mismatch(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred) {
|
||||
return first1 == last1 || pred(*first1, *first2) == false
|
||||
return first1 == last1 || !pred(*first1, *first2)
|
||||
? sprout::pair<InputIterator1, InputIterator2>{first1, first2}
|
||||
: sprout::mismatch(sprout::next(first1), last1, sprout::next(first2))
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue