cpp/algorithm/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 output range is also sorted.

If contains  elements that are equivalent to each other and  contains  elements that are equivalent to them, then  of those elements will be copied to the output range, preserving order:
 * if, the final of these elements from
 * if, the final of these elements from

@1@ Elements are compared using and the ranges must be sorted with respect to the same. @3@ Elements are compared using the given binary comparison function and the ranges must be sorted with respect to the same. @2,4@ Same as, but executed according to.

If either of the input ranges is not sorted (using or, respectively) or overlaps with the output range, the behavior is undefined.

Return value
Iterator past the end of the constructed range.

Complexity
Given and  as  and  respectively: @1,2@ at most comparisons using @3,4@ at most applications of the predicate