C++ Standard Library set_symmetric_difference() Sample

Description

set_symmetric_difference() computes the difference of two sorted sequences of elements, and inserts the result into a container referenced by an output iterator. The difference is defined to be those elements that are members of one, but not both, of the sequences. Duplicate elements are eliminated on output.

Declaration

	template <class In, class In2, class Out>
	    Out set_symmetric_difference(In, In, In2, In2, Out);
	template <class In, class In2, class Out, class Cmp>
	    Out set_symmetric_difference(In, In, In2, In2, Out, Cmp);

Concept

The sample sets up two sorted vectors, and then computes their difference. The results of the computation are inserted into a third vector, using a back_inserter() function. The values 1 and 2 are output by the program.

Supported
Supported
Supported