absl::c_unique_copy

Container-based version of the <algorithm> std::unique_copy() function to copy a container's elements while removing any elements containing duplicate values.

Synopsis

Declared in <absl/algorithm/container.h>

template<
    typename C,
    typename OutputIterator>
constexpr
OutputIterator
c_unique_copy(
    C const& c,
    OutputIterator result);

Return Value

An iterator to the end of the copied range in the output.

Parameters

NameDescription
cThe container whose elements to copy.
resultThe output iterator receiving the copied elements.