]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/range/doc/reference/algorithm/find.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / range / doc / reference / algorithm / find.qbk
1 [/
2 Copyright 2010 Neil Groves
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 /]
6 [section:find find]
7
8 [heading Prototype]
9
10 ``
11 template<class SinglePassRange, class Value>
12 typename range_iterator<SinglePassRange>::type
13 find(SinglePassRange& rng, Value val);
14
15 template<
16 range_return_value re,
17 class SinglePassRange,
18 class Value
19 >
20 typename range_return<SinglePassRange, re>::type
21 find(SinglePassRange& rng, Value val);
22 ``
23
24 [heading Description]
25
26 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.
27 The versions of find that return a `range_return`, defines `found` in the same manner as the returned iterator described above.
28
29 [heading Definition]
30
31 Defined in the header file `boost/range/algorithm/find.hpp`
32
33 [heading Requirements]
34
35 * `SinglePassRange` is a model of the __single_pass_range__ Concept.
36 * `Value` is a model of the `EqualityComparableConcept`.
37 * The `operator==` is defined for type `Value` to be compared with the `SinglePassRange`'s value type.
38
39 [heading Complexity]
40
41 Linear. At most `distance(rng)` comparisons for equality.
42
43 [endsect]
44
45