absl::c_set_intersection

Container-based version of the <algorithm> std::set_intersection() function to return an iterator containing the intersection of two sorted containers.

Synopsis

Declared in <absl/algorithm/container.h>

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

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 intersection.