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

@ -20,7 +20,7 @@ namespace sprout {
inline SPROUT_CONSTEXPR bool
equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred) {
return first1 == last1 ? true
: pred(*first1, *first2) != false && sprout::equal(sprout::next(first1), last1, sprout::next(first2), pred)
: pred(*first1, *first2) && sprout::equal(sprout::next(first1), last1, sprout::next(first2), pred)
;
}
} // namespace sprout