mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
28 lines
1.3 KiB
Text
28 lines
1.3 KiB
Text
hi(unique_copy)
|
|
itemization(
|
|
it() Header file: tt(<algorithm>)
|
|
it() Function prototypes:
|
|
itemization(
|
|
itt(OutputIterator unique_copy(InputIterator first,
|
|
InputIterator last, OutputIterator result);)
|
|
itt(OutputIterator unique_copy(InputIterator first,
|
|
InputIterator last, OutputIterator result, BinaryPredicate pred);)
|
|
)
|
|
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).
|
|
Consecutively equal elements (using ti(operator==) of the data type to which
|
|
the iterators point) are copied only once (keeping the first of a series of
|
|
equal elements). The returned output iterator points
|
|
just beyond the last copied element.
|
|
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.
|
|
)
|
|
it() Example:
|
|
verbinclude(-a examples/uniquecopy.cc)
|
|
)
|