forked from boostorg/range
Boost.RangeEx merged into Boost.Range
[SVN r60897]
This commit is contained in:
52
doc/reference/algorithm/find.qbk
Normal file
52
doc/reference/algorithm/find.qbk
Normal file
@ -0,0 +1,52 @@
|
||||
[section:find find]
|
||||
|
||||
[heading Prototype]
|
||||
|
||||
``
|
||||
template<class SinglePassRange, class Value>
|
||||
typename range_iterator<SinglePassRange>::type
|
||||
find(SinglePassRange& rng, Value val);
|
||||
|
||||
template<class SinglePassRange, class Value>
|
||||
typename range_iterator<const SinglePassRange>::type
|
||||
find(const SinglePassRange& rng, Value val);
|
||||
|
||||
template<
|
||||
range_return_value re,
|
||||
class SinglePassRange,
|
||||
class Value
|
||||
>
|
||||
typename range_return<SinglePassRange, re>::type
|
||||
find(SinglePassRange& rng, Value val);
|
||||
|
||||
template<
|
||||
range_return_value re,
|
||||
class SinglePassRange,
|
||||
class Value
|
||||
>
|
||||
typename range_return<const SinglePassRange, re>::type
|
||||
find(const SinglePassRange& rng, Value val);
|
||||
``
|
||||
|
||||
[heading Description]
|
||||
|
||||
The versions of `find` that return an iterator, returns the first iterator in the range `rng` such that `*i == value`. `end(rng)` is returned if no such iterator exists.
|
||||
The versions of find that return a `range_return`, defines `found` in the same manner as the returned iterator described above.
|
||||
|
||||
[heading Definition]
|
||||
|
||||
Defined in the header file `boost/range/algorithm/find.hpp`
|
||||
|
||||
[heading Requirements]
|
||||
|
||||
* `SinglePassRange` is a model of the __single_pass_range__ Concept.
|
||||
* `Value` is a model of the `EqualityComparableConcept`.
|
||||
* The `operator==` is defined for type `Value` to be compared with the `SinglePassRange`'s value type.
|
||||
|
||||
[heading Complexity]
|
||||
|
||||
Linear. At most `distance(rng)` comparisons for equality.
|
||||
|
||||
[endsect]
|
||||
|
||||
|
Reference in New Issue
Block a user