2 Copyright 2010 Neil Groves
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 [section:set_symmetric_difference set_symmetric_difference]
12 class SinglePassRange1,
13 class SinglePassRange2,
17 set_symmetric_difference(const SinglePassRange1& rng1,
18 const SinglePassRange2& rng2,
22 class SinglePassRange1,
23 class SinglePassRange2,
28 set_symmetric_difference(const SinglePassRange1& rng1,
29 const SinglePassRange2& rng2,
31 BinaryPredicate pred);
36 `set_symmetric_difference` constructs a sorted range that is the set symmetric difference of the sorted ranges `rng1` and `rng2`. The return value is the end of the output range.
38 The ordering relationship is determined by using `operator<` in the non-predicate versions, and by evaluating `pred` in the predicate versions.
42 Defined in the header file `boost/range/algorithm/set_algorithm.hpp`
44 [heading Requirements]
46 [*For the non-predicate versions:]
48 * `SinglePassRange1` is a model of the __single_pass_range__ Concept.
49 * `SinglePassRange2` is a model of the __single_pass_range__ Concept.
50 * `OutputIterator` is a model of the `OutputIteratorConcept`.
51 * `SinglePassRange1` and `SinglePassRange2` have the same value type.
52 * `SinglePassRange1`'s value type is a model of the `LessThanComparableConcept`.
53 * `SinglePassRange2`'s value type is a model of the `LessThanComparableConcept`.
54 * The ordering of objects of type `SinglePassRange1`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
55 * The ordering of objects of type `SinglePassRange2`'s value type is a [*/strict weak ordering/], as defined in the `LessThanComparableConcept` requirements.
57 [*For the predicate versions:]
59 * `SinglePassRange1` is a model of the __single_pass_range__ Concept.
60 * `SinglePassRange2` is a model of the __single_pass_range__ Concept.
61 * `OutputIterator` is a model of the `OutputIteratorConcept`.
62 * `SinglePassRange1` and `SinglePassRange2` have the same value type.
63 * `BinaryPredicate` is a model of the `StrictWeakOrderingConcept`.
64 * `SinglePassRange1`'s value type is convertible to `BinaryPredicate`'s first argument type.
65 * `SinglePassRange2`'s value type is convertible to `BinaryPredicate`'s second argument types.
67 [heading Precondition:]
69 [*For the non-predicate versions:]
71 `rng1` and `rng2` are sorted in ascending order according to `operator<`.
73 [*For the predicate versions:]
75 `rng1` and `rng2` are sorted in ascending order according to `pred`.
79 Linear. `O(N)`, where `N` is `distance(rng1) + distance(rng2)`.