`Description`

`Description`

```
```*Set_union* constructs a sorted range that is the union of the sorted ranges *[first1, last1)* and *[first2, last2)* . The return value is the end of the output range.

In the simplest case, *set_union* performs the "union" operation from set theory: the output range contains a copy of every element that is contained in *[first1, last1)*, *[first2, last2)*, or both. The general case is more complicated, because the input ranges may contain duplicate elements. The generalization is that if a value appears *m* times in *[first1, last1)* and *n* times in *[first2, last2)* (where *m* or *n* may be zero), then it appears *max(m,n)* times in the output range. [1]* Set_union* is stable, meaning both that the relative order of elements within each input range is preserved, and that if an element is present in both input ranges it is copied from the first range rather than the second.

The two versions of *set_union* differ in how they define whether one element is less than another. The first version compares objects using *operator<*, and the second compares objects using a function object *comp*.