c_set_difference overloads

Synopses

Declared in <absl/algorithm/container.h>

Container‐based version of the <algorithm> std::set_difference() function to return an iterator containing elements present in the first container but not in the second.

template<
    typename C1,
    typename C2,
    typename OutputIterator>
requires !container_algorithm_internal::IsUnorderedContainer<C1>::value && !container_algorithm_internal::IsUnorderedContainer<C2>::value
constexpr
OutputIterator
c_set_difference(
    C1 const& c1,
    C2 const& c2,
    OutputIterator output);

Overload of c_set_difference() for performing a merge using a comp other than operator<.

template<
    typename C1,
    typename C2,
    typename OutputIterator,
    typename LessThan>
requires !container_algorithm_internal::IsUnorderedContainer<C1>::value && !container_algorithm_internal::IsUnorderedContainer<C2>::value
constexpr
OutputIterator
c_set_difference(
    C1 const& c1,
    C2 const& c2,
    OutputIterator output,
    LessThan&& comp);

Return Value

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

Parameters

Name

Description

c1

The first sorted container.

c2

The second sorted container.

output

The output iterator receiving the difference.

comp

The comparison used to order the elements.

Created with MrDocs