Syntax:
#include <algorithm> output_iterator set_union( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result ); output_iterator set_union( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_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