cppannotations/yo/stl/unique.yo
fbbrokken 6881bc3814 The trunk directory contains the latest version (6.4.0c) of the C++
Annotations. 

The branches and tags directory are empty, since I couldn't
svnadmin import a repostitory dump. Many earlier versions exist, though, and
if you want the full archive, just let me know and I'll send you the svnadmin
dump of my full C++ Annotations archive.

Frank B. Brokken <f.b.brokken@rug.nl>



git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@3 f6dd340e-d3f9-0310-b409-bdd246841980
2006-09-04 08:26:34 +00:00

34 lines
1.7 KiB
Text

hi(unique())
itemization(
it() Header file:
centt(#include <algorithm>)
it() Function prototypes:
itemization(
itt(ForwardIterator unique(ForwardIterator first,
ForwardIterator last);)
itt(ForwardIterator unique+OPENPARForwardIterator first,
ForwardIterator last,)linebreak()tt(BinaryPredicate pred+CLOSEPAR;)
)
it() Description:
itemization(
it() The first prototype: using ti(operator==()), all but the
first of consecutively equal elements of the data type to which the iterators
point 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., 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(stl/cc/unique.cc)
)