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

@ -11,7 +11,7 @@ namespace sprout {
template<typename InputIterator, typename Predicate>
inline SPROUT_CONSTEXPR InputIterator
find_if(InputIterator first, InputIterator last, Predicate pred) {
return first == last || pred(*first) != false ? first
return first == last || pred(*first) ? first
: sprout::find_if(sprout::next(first), last, pred)
;
}