set_symmetric_difference [C++ Reference]
Keywords: stl,algorithm,set_symmetric_difference
Date: 2009-10-09T02:06:42-0700

[[set_symmetric_difference]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## set_symmetric_difference

Syntax:

        #include <algorithm>
        output_iterator set_symmetric_difference( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result );
        output_iterator set_symmetric_difference( input_iterator start1, input_iterator end1, input_iterator2 start2, input_iterator2 end2, output_iterator result, StrictWeakOrdering cmp );

The set_symmetric_difference() algorithm computes the symmetric difference of the two sets defined by [start1,end1) and [start2,end2) and stores the difference starting at result.

Both of the sets, given as ranges, must be sorted in ascending order.

The return value of set_symmetric_difference() is an iterator to the end of the result range.

If the strict weak ordering comparison function object cmp is not specified, set_symmetric_difference() will use the < operator to compare elements.

Related Topics: includes, set_difference, set_intersection, set_union

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •