2009-12-31 23:00:13 +01:00
|
|
|
hi(unique_copy)
|
2006-09-04 10:26:34 +02:00
|
|
|
itemization(
|
2009-12-31 23:00:13 +01:00
|
|
|
it() Header file: tt(<algorithm>)
|
2006-09-04 10:26:34 +02:00
|
|
|
it() Function prototypes:
|
|
|
|
itemization(
|
2014-06-05 14:21:02 +02:00
|
|
|
itt(OutputIterator unique_copy(InputIterator first,
|
|
|
|
InputIterator last, OutputIterator result);)
|
|
|
|
itt(OutputIterator unique_copy(InputIterator first,
|
|
|
|
InputIterator last, OutputIterator result, BinaryPredicate pred);)
|
2006-09-04 10:26:34 +02:00
|
|
|
)
|
|
|
|
it() Description:
|
|
|
|
itemization(
|
|
|
|
it() The first prototype: the elements in the range rangett(first,
|
|
|
|
last) are copied to the resulting container, starting at tt(result).
|
2009-12-31 23:00:13 +01:00
|
|
|
Consecutively equal elements (using ti(operator==) of the data type to which
|
2011-02-25 09:58:10 +01:00
|
|
|
the iterators point) are copied only once (keeping the first of a series of
|
|
|
|
equal elements). The returned output iterator points
|
2006-09-04 10:26:34 +02:00
|
|
|
just beyond the last copied element.
|
2011-02-25 09:58:10 +01:00
|
|
|
it() The second prototype: the elements in the range
|
|
|
|
rangett(first, last) are copied to the resulting container, starting at
|
|
|
|
tt(result). Consecutive elements in the range pointed to by rangett(first,
|
|
|
|
last) for which the binary predicate tt(pred) returns tt(true) are copied only
|
|
|
|
once (keeping the first of a series of equal elements). The returned output
|
|
|
|
iterator points just beyond the last copied element.
|
2006-09-04 10:26:34 +02:00
|
|
|
)
|
|
|
|
it() Example:
|
2014-09-23 22:09:37 +02:00
|
|
|
verbinclude(-a examples/uniquecopy.cc)
|
2006-09-04 10:26:34 +02:00
|
|
|
)
|