cpp/algorithm/ranges/unique copy

@1@ Copies the elements from the source range, to the destination range beginning at in such a way that there are no consecutive equal elements. Only the first element of each group of equal elements is copied.

@@ The ranges and  must not overlap. .

@@ Two consecutive elements and  are considered equivalent if, where  is an iterator in the range.

@2@ Same as, but uses as the range, as if using  as , and  as.

Return value
.

Complexity
Exactly applications of the corresponding predicate  and no more than twice as many applications of any projection.

Possible implementation
See also the implementations in libstdc++ and MSVC STL (and third-party libraries: cmcstl2, NanoRange, and range-v3).