A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://sgistl.github.io/find_if.html below:

find_if

find_if Prototype
template<class InputIterator, class Predicate>
InputIterator find_if(InputIterator first, InputIterator last,
                      Predicate pred);
Description Returns the first iterator i in the range [first, last) such that pred(*i) is true. Returns last if no such iterator exists. Definition Defined in the standard header algorithm, and in the nonstandard backward-compatibility header algo.h. Requirements on types Preconditions Complexity Linear: at most last - first applications of Pred. Example
list<int> L;
L.push_back(-3);
L.push_back(0);
L.push_back(3);
L.push_back(-2);

list<int>::iterator result = find_if(L.begin(), L.end(),
                                     bind2nd(greater<int>(), 0));
assert(result == L.end() || *result > 0);
Notes See alsofind. STL Main Page

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4