From Jason Turner

[alg.set.operations]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpnd31omnt/{from.md → to.md} +11 -11
tmp/tmpnd31omnt/{from.md → to.md} RENAMED
@@ -1,13 +1,15 @@
1
  ### Set operations on sorted structures <a id="alg.set.operations">[[alg.set.operations]]</a>
2
 
3
- This subclause defines all the basic set operations on sorted
4
- structures. They also work with `multiset`s [[multiset]] containing
5
- multiple copies of equivalent elements. The semantics of the set
6
- operations are generalized to `multiset`s in a standard way by defining
7
- `set_union` to contain the maximum number of occurrences of every
8
- element, `set_intersection` to contain the minimum, and so on.
 
 
9
 
10
  #### `includes` <a id="includes">[[includes]]</a>
11
 
12
  ``` cpp
13
  template<class InputIterator1, class InputIterator2>
@@ -60,12 +62,11 @@ keeping the remaining elements in the same order. — *end note*]
60
  comparisons and applications of each projection.
61
 
62
  #### `set_union` <a id="set.union">[[set.union]]</a>
63
 
64
  ``` cpp
65
- template<class InputIterator1, class InputIterator2,
66
- class OutputIterator>
67
  constexpr OutputIterator
68
  set_union(InputIterator1 first1, InputIterator1 last1,
69
  InputIterator2 first2, InputIterator2 last2,
70
  OutputIterator result);
71
  template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
@@ -74,12 +75,11 @@ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
74
  set_union(ExecutionPolicy&& exec,
75
  ForwardIterator1 first1, ForwardIterator1 last1,
76
  ForwardIterator2 first2, ForwardIterator2 last2,
77
  ForwardIterator result);
78
 
79
- template<class InputIterator1, class InputIterator2,
80
- class OutputIterator, class Compare>
81
  constexpr OutputIterator
82
  set_union(InputIterator1 first1, InputIterator1 last1,
83
  InputIterator2 first2, InputIterator2 last2,
84
  OutputIterator result, Compare comp);
85
  template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
@@ -273,11 +273,11 @@ Returns
273
  comparisons and applications of each projection.
274
 
275
  *Remarks:* If \[`first1`, `last1`) contains m elements that are
276
  equivalent to each other and \[`first2`, `last2`) contains n elements
277
  that are equivalent to them, the last max(m - n, 0) elements from
278
- \[`first1`, `last1`) is copied to the output range, in order.
279
 
280
  #### `set_symmetric_difference` <a id="set.symmetric.difference">[[set.symmetric.difference]]</a>
281
 
282
  ``` cpp
283
  template<class InputIterator1, class InputIterator2,
 
1
  ### Set operations on sorted structures <a id="alg.set.operations">[[alg.set.operations]]</a>
2
 
3
+ #### General <a id="alg.set.operations.general">[[alg.set.operations.general]]</a>
4
+
5
+ Subclause [[alg.set.operations]] defines all the basic set operations on
6
+ sorted structures. They also work with `multiset`s [[multiset]]
7
+ containing multiple copies of equivalent elements. The semantics of the
8
+ set operations are generalized to `multiset`s in a standard way by
9
+ defining `set_union` to contain the maximum number of occurrences of
10
+ every element, `set_intersection` to contain the minimum, and so on.
11
 
12
  #### `includes` <a id="includes">[[includes]]</a>
13
 
14
  ``` cpp
15
  template<class InputIterator1, class InputIterator2>
 
62
  comparisons and applications of each projection.
63
 
64
  #### `set_union` <a id="set.union">[[set.union]]</a>
65
 
66
  ``` cpp
67
+ template<class InputIterator1, class InputIterator2, class OutputIterator>
 
68
  constexpr OutputIterator
69
  set_union(InputIterator1 first1, InputIterator1 last1,
70
  InputIterator2 first2, InputIterator2 last2,
71
  OutputIterator result);
72
  template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
 
75
  set_union(ExecutionPolicy&& exec,
76
  ForwardIterator1 first1, ForwardIterator1 last1,
77
  ForwardIterator2 first2, ForwardIterator2 last2,
78
  ForwardIterator result);
79
 
80
+ template<class InputIterator1, class InputIterator2, class OutputIterator, class Compare>
 
81
  constexpr OutputIterator
82
  set_union(InputIterator1 first1, InputIterator1 last1,
83
  InputIterator2 first2, InputIterator2 last2,
84
  OutputIterator result, Compare comp);
85
  template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
 
273
  comparisons and applications of each projection.
274
 
275
  *Remarks:* If \[`first1`, `last1`) contains m elements that are
276
  equivalent to each other and \[`first2`, `last2`) contains n elements
277
  that are equivalent to them, the last max(m - n, 0) elements from
278
+ \[`first1`, `last1`) are copied to the output range, in order.
279
 
280
  #### `set_symmetric_difference` <a id="set.symmetric.difference">[[set.symmetric.difference]]</a>
281
 
282
  ``` cpp
283
  template<class InputIterator1, class InputIterator2,