| 109 | |
| 110 | template<class InputIt, class UnaryPredicate> |
| 111 | InputIt find_if(InputIt first, InputIt last, UnaryPredicate p) |
| 112 | { |
| 113 | for (; first != last; ++first) { |
| 114 | if (p(*first)) { |
| 115 | return first; |
| 116 | } |
| 117 | } |
| 118 | return last; |
| 119 | } |
| 120 | |
| 121 | template<class ForwardIt1, class ForwardIt2, class BinaryPredicate> |
| 122 | ForwardIt1 find_end (ForwardIt1 first1, ForwardIt1 last1 |
no outgoing calls