File: copy.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 (30 lines) | stat: -rw-r--r-- 1,404 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
    hi(copy) hi(copy_if)
    itemization(
        it() Header file: tt(<algorithm>)
        it() Function prototypes:
        itemization(
            itt(OutputIterator copy([ExecPol,] InputIterator first,
InputIterator last, OutputIterator destination);)
            itt(OutputIterator copy_if([ExecPol,] InputIterator first,
InputIterator last, OutputIterator destination, Predicate pred);)
        )
        it() Description:
        itemization(
            it() First prototype: the elements reached from the iterator range
rangett(first, last) are copied (assigned) to the tt(destination) output
range. The return value is the OutputIterator pointing just beyond the last
element that was copied to the destination range (so, `last' in the
destination range is returned).
            it() Second prototype: same as the first prototype but the
function ends after copying tt(n) elements, returning an iterator pointing
just beyond the last element that was copied to the destination range.
        )
        it() Example:nl()
    Note the second call to tt(copy). It uses an tt(ostream_iterator) for
tt(string) objects. This iterator writes the tt(string) values to the
specified tt(ostream) (i.e., tt(cout)), separating the values by the specified
separation string (i.e., tt(" ")).
        verbinclude(-a examples/copy.cc)
        it() See also:
            link(tt(unique_copy))(UNIQUECP)
    )