set_union

Syntax:

    #include <algorithm>
    iterator set_union( iterator start1, iterator end1, iterator start2, iterator end2, iterator result );
    iterator set_union( iterator start1, iterator end1, iterator start2, iterator end2, iterator result, StrictWeakOrdering cmp );

The set_union() algorithm computes the sorted union of the two sorted ranges [start1,end1) and [start2,end2) and stores it starting at result.

The return value of set_union() is an iterator to the end of the union range.

set_union() runs in linear time.

Related Topics: includes, merge, set_difference, set_intersection, set_symmetric_difference