set_intersection()

set_intersection() constructs a sorted sequence of the elements present in both sequences. For example, given the two sequences {0,1,2,3} and {0,2,4,6}, the set intersection is {0,2}.

Get Essential C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.