absl::c_set_symmetric_difference

c_set_symmetric_difference overloads

Synopses

Declared in <absl/algorithm/container.h>

Container-based version of the <algorithm> std::set_symmetric_difference() function to return an iterator containing elements present in either one container or the other, but not both.

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

Overload of c_set_symmetric_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_symmetric_difference(
    C1 const& c1,
    C2 const& c2,
    OutputIterator output,
    LessThan&& comp);
» more...

Return Value

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

Parameters

NameDescription
c1The first sorted container.
c2The second sorted container.
outputThe output iterator receiving the symmetric difference.
compThe comparison used to order the elements.