llvm::set_intersection_impl

Build a new set containing the elements present in both S1 and S2.

Synopsis

Declared in <llvm/ADT/SetOperations.h>

template<
    class S1Ty,
    class S2Ty>
S1Ty
set_intersection_impl(
    S1Ty const& S1,
    S2Ty const& S2);

Description

Iterates over S1 and inserts each element that is also found in S2. Prefer set_intersection, which picks the smaller set to iterate.

Return Value

A new set of type S1Ty containing the intersection of S1 and S2.

Parameters

NameDescription
S1First set (also determines the result type).
S2Second set used for membership tests.