File: search.yo

package info (click to toggle)
c%2B%2B-annotations 13.02.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,576 kB
  • sloc: cpp: 25,297; makefile: 1,523; ansic: 165; sh: 126; perl: 90; fortran: 27
file content (45 lines) | stat: -rw-r--r-- 2,219 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
hi(search) hi(search_n)
    itemization(
        it() Header file: tt(<algorithm>)
        it() Function prototypes:
        itemization(
            itt(ForwardIterator search([ExecPol,] ForwardIterator first1,
ForwardIterator last1, ForwardIterator first2, ForwardIterator last2);)
            itt(ForwardIterator1 search([ExecPol,] ForwardIterator first1,
ForwardIterator last1, ForwardIterator first2, ForwardIterator last2,
BinaryPredicate pred);)
            itt(constexpr ForwardIterator1 search([ExecPol,] 
ForwardIterator first, ForwardIterator last, Searcher const &searcher);)

            itt(ForwardIterator search_n([ExecPol,] ForwardIterator first,
ForwardIterator last, Size count, Type const &value);)
            itt(ForwardIterator search_n([ExecPol,] ForwardIterator first1,
ForwardIterator last1, Size count, Type const &value, 
BinaryPredicate pred);)

        )
        it() Description:
        itemization(
            it() The first prototype: an iterator into the first range
rangett(first1, last1) is returned where the elements in the range
rangett(first2, last2) are found using ti(operator==) of the data
type to which the iterators point. If no such location exists, tt(last1) is
returned.
            it() The second prototype: an iterator into the first range
rangett(first1, last1) is returned where the elements in the range
rangett(first2, last2) are found using the provided binary predicate tt(pred)
to compare the elements in the two ranges. If no such location exists,
tt(last1) is returned.
            it() The third prototype: returns tt(searcher(first, last).first):
tt(searcher) receives the range of elements, and returns an iterator into this
range (or tt(last) if tt(searcher) found no match) as tt(searcher(first,
last).first).
            it() The final two prototypes inspect the elements in the range
rangett(first, last) for the first series of tt(count) elements equal to
tt(value), returning the first iterator to those tt(count) elements. If no
such series exists then tt(last) is returned. The last protottype calls
tt(pred) to determine whether an element is equal to tt(value).
        )
        it() Example:
        verbinclude(-a examples/search.cc)
    )