cpp/algorithm/ranges/set symmetric difference

Computes symmetric difference of two sorted ranges: the elements that are found in either of the ranges, but not in both of them are copied to the range beginning at. The resulting range is also sorted.

If some element is found times in  and  times in, it will be copied to  exactly  times. If, then the last of those elements are copied from , otherwise the last  elements are copied from. The resulting range cannot overlap with either of the input ranges.

The behavior is undefined if
 * the input ranges are not sorted with respect to and  or, respectively, or
 * the resulting range overlaps with either of the input ranges.

@1@ Elements are compared using the given binary comparison function.

@2@ Same as, but uses as the first range and  as the second range, as if using  as ,  as ,  as , and  as.

Return value
, where is the end of the constructed range.

Complexity
At most comparisons and applications of each projection, where  and  are  and, respectively.