mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-16 07:48:44 +01:00
33 lines
1.6 KiB
Text
33 lines
1.6 KiB
Text
hi(unique)
|
|
itemization(
|
|
it() Header file: tt(<algorithm>)
|
|
it() Function prototypes:
|
|
itemization(
|
|
itt(ForwardIterator unique(ForwardIterator first,
|
|
ForwardIterator last);)
|
|
itt(ForwardIterator unique(ForwardIterator first,
|
|
ForwardIterator last, BinaryPredicate pred);)
|
|
)
|
|
it() Description:
|
|
itemization(
|
|
it() The first prototype: using ti(operator==) of the data type to
|
|
which the iterators point, all but the first of consecutively equal elements
|
|
in the range pointed to by rangett(first, last) are relocated to the end of
|
|
the range. The returned forward iterator marks the beginning of the
|
|
emi(leftover). All elements in the range rangett(first, return-value) are
|
|
unique, all elements in the range rangett(return-value, last) are equal to
|
|
elements in the range rangett(first, return-value).
|
|
it() The second prototype: all but the first of consecutive
|
|
elements in the range pointed to by rangett(first, last) for which the binary
|
|
predicate tt(pred) (expecting two arguments of the data type to which the
|
|
iterators point) returns tt(true), are relocated to the end of the range. The
|
|
returned forward iterator marks the beginning of the emi(leftover). For all
|
|
pairs of elements in the range rangett(first, return-value) tt(pred) returns
|
|
tt(false) (i.e., they are em(unique)), while tt(pred) returns tt(true) for a
|
|
combination of, as its first operand, an element in the range
|
|
rangett(return-value, last) and, as its second operand, an element in the
|
|
range rangett(first, return-value).
|
|
)
|
|
it() Example:
|
|
verbinclude(-a examples/unique.cc)
|
|
)
|