From Jason Turner

[alg.set.operations]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp3w_bfrtk/{from.md → to.md} +77 -12
tmp/tmp3w_bfrtk/{from.md → to.md} RENAMED
@@ -11,15 +11,24 @@ to contain the maximum number of occurrences of every element,
11
 
12
  ``` cpp
13
  template<class InputIterator1, class InputIterator2>
14
  bool includes(InputIterator1 first1, InputIterator1 last1,
15
  InputIterator2 first2, InputIterator2 last2);
 
 
 
 
16
 
17
  template<class InputIterator1, class InputIterator2, class Compare>
18
  bool includes(InputIterator1 first1, InputIterator1 last1,
19
  InputIterator2 first2, InputIterator2 last2,
20
  Compare comp);
 
 
 
 
 
21
  ```
22
 
23
  *Returns:* `true` if \[`first2`, `last2`) is empty or if every element
24
  in the range \[`first2`, `last2`) is contained in the range \[`first1`,
25
  `last1`). Returns `false` otherwise.
@@ -34,26 +43,40 @@ template<class InputIterator1, class InputIterator2,
34
  class OutputIterator>
35
  OutputIterator
36
  set_union(InputIterator1 first1, InputIterator1 last1,
37
  InputIterator2 first2, InputIterator2 last2,
38
  OutputIterator result);
 
 
 
 
 
 
 
39
 
40
  template<class InputIterator1, class InputIterator2,
41
  class OutputIterator, class Compare>
42
  OutputIterator
43
  set_union(InputIterator1 first1, InputIterator1 last1,
44
  InputIterator2 first2, InputIterator2 last2,
45
  OutputIterator result, Compare comp);
 
 
 
 
 
 
 
46
  ```
47
 
 
 
 
48
  *Effects:* Constructs a sorted union of the elements from the two
49
  ranges; that is, the set of elements that are present in one or both of
50
  the ranges.
51
 
52
- *Requires:* The resulting range shall not overlap with either of the
53
- original ranges.
54
-
55
  *Returns:* The end of the constructed range.
56
 
57
  *Complexity:* At most `2 * ((last1 - first1) + (last2 - first2)) - 1`
58
  comparisons.
59
 
@@ -71,26 +94,40 @@ template<class InputIterator1, class InputIterator2,
71
  class OutputIterator>
72
  OutputIterator
73
  set_intersection(InputIterator1 first1, InputIterator1 last1,
74
  InputIterator2 first2, InputIterator2 last2,
75
  OutputIterator result);
 
 
 
 
 
 
 
76
 
77
  template<class InputIterator1, class InputIterator2,
78
  class OutputIterator, class Compare>
79
  OutputIterator
80
  set_intersection(InputIterator1 first1, InputIterator1 last1,
81
  InputIterator2 first2, InputIterator2 last2,
82
  OutputIterator result, Compare comp);
 
 
 
 
 
 
 
83
  ```
84
 
 
 
 
85
  *Effects:* Constructs a sorted intersection of the elements from the two
86
  ranges; that is, the set of elements that are present in both of the
87
  ranges.
88
 
89
- *Requires:* The resulting range shall not overlap with either of the
90
- original ranges.
91
-
92
  *Returns:* The end of the constructed range.
93
 
94
  *Complexity:* At most `2 * ((last1 - first1) + (last2 - first2)) - 1`
95
  comparisons.
96
 
@@ -106,26 +143,40 @@ template<class InputIterator1, class InputIterator2,
106
  class OutputIterator>
107
  OutputIterator
108
  set_difference(InputIterator1 first1, InputIterator1 last1,
109
  InputIterator2 first2, InputIterator2 last2,
110
  OutputIterator result);
 
 
 
 
 
 
 
111
 
112
  template<class InputIterator1, class InputIterator2,
113
  class OutputIterator, class Compare>
114
  OutputIterator
115
  set_difference(InputIterator1 first1, InputIterator1 last1,
116
  InputIterator2 first2, InputIterator2 last2,
117
  OutputIterator result, Compare comp);
 
 
 
 
 
 
 
118
  ```
119
 
 
 
 
120
  *Effects:* Copies the elements of the range \[`first1`, `last1`) which
121
  are not present in the range \[`first2`, `last2`) to the range beginning
122
  at `result`. The elements in the constructed range are sorted.
123
 
124
- *Requires:* The resulting range shall not overlap with either of the
125
- original ranges.
126
-
127
  *Returns:* The end of the constructed range.
128
 
129
  *Complexity:* At most `2 * ((last1 - first1) + (last2 - first2)) - 1`
130
  comparisons.
131
 
@@ -141,28 +192,42 @@ template<class InputIterator1, class InputIterator2,
141
  class OutputIterator>
142
  OutputIterator
143
  set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
144
  InputIterator2 first2, InputIterator2 last2,
145
  OutputIterator result);
 
 
 
 
 
 
 
146
 
147
  template<class InputIterator1, class InputIterator2,
148
  class OutputIterator, class Compare>
149
  OutputIterator
150
  set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
151
  InputIterator2 first2, InputIterator2 last2,
152
  OutputIterator result, Compare comp);
 
 
 
 
 
 
 
153
  ```
154
 
 
 
 
155
  *Effects:* Copies the elements of the range \[`first1`, `last1`) that
156
  are not present in the range \[`first2`, `last2`), and the elements of
157
  the range \[`first2`, `last2`) that are not present in the range
158
  \[`first1`, `last1`) to the range beginning at `result`. The elements in
159
  the constructed range are sorted.
160
 
161
- *Requires:* The resulting range shall not overlap with either of the
162
- original ranges.
163
-
164
  *Returns:* The end of the constructed range.
165
 
166
  *Complexity:* At most `2 * ((last1 - first1) + (last2 - first2)) - 1`
167
  comparisons.
168
 
 
11
 
12
  ``` cpp
13
  template<class InputIterator1, class InputIterator2>
14
  bool includes(InputIterator1 first1, InputIterator1 last1,
15
  InputIterator2 first2, InputIterator2 last2);
16
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2>
17
+ bool includes(ExecutionPolicy&& exec,
18
+ ForwardIterator1 first1, ForwardIterator1 last1,
19
+ ForwardIterator2 first2, ForwardIterator2 last2);
20
 
21
  template<class InputIterator1, class InputIterator2, class Compare>
22
  bool includes(InputIterator1 first1, InputIterator1 last1,
23
  InputIterator2 first2, InputIterator2 last2,
24
  Compare comp);
25
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class Compare>
26
+ bool includes(ExecutionPolicy&& exec,
27
+ ForwardIterator1 first1, ForwardIterator1 last1,
28
+ ForwardIterator2 first2, ForwardIterator2 last2,
29
+ Compare comp);
30
  ```
31
 
32
  *Returns:* `true` if \[`first2`, `last2`) is empty or if every element
33
  in the range \[`first2`, `last2`) is contained in the range \[`first1`,
34
  `last1`). Returns `false` otherwise.
 
43
  class OutputIterator>
44
  OutputIterator
45
  set_union(InputIterator1 first1, InputIterator1 last1,
46
  InputIterator2 first2, InputIterator2 last2,
47
  OutputIterator result);
48
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
49
+ class ForwardIterator>
50
+ ForwardIterator
51
+ set_union(ExecutionPolicy&& exec,
52
+ ForwardIterator1 first1, ForwardIterator1 last1,
53
+ ForwardIterator2 first2, ForwardIterator2 last2,
54
+ ForwardIterator result);
55
 
56
  template<class InputIterator1, class InputIterator2,
57
  class OutputIterator, class Compare>
58
  OutputIterator
59
  set_union(InputIterator1 first1, InputIterator1 last1,
60
  InputIterator2 first2, InputIterator2 last2,
61
  OutputIterator result, Compare comp);
62
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
63
+ class ForwardIterator, class Compare>
64
+ ForwardIterator
65
+ set_union(ExecutionPolicy&& exec,
66
+ ForwardIterator1 first1, ForwardIterator1 last1,
67
+ ForwardIterator2 first2, ForwardIterator2 last2,
68
+ ForwardIterator result, Compare comp);
69
  ```
70
 
71
+ *Requires:* The resulting range shall not overlap with either of the
72
+ original ranges.
73
+
74
  *Effects:* Constructs a sorted union of the elements from the two
75
  ranges; that is, the set of elements that are present in one or both of
76
  the ranges.
77
 
 
 
 
78
  *Returns:* The end of the constructed range.
79
 
80
  *Complexity:* At most `2 * ((last1 - first1) + (last2 - first2)) - 1`
81
  comparisons.
82
 
 
94
  class OutputIterator>
95
  OutputIterator
96
  set_intersection(InputIterator1 first1, InputIterator1 last1,
97
  InputIterator2 first2, InputIterator2 last2,
98
  OutputIterator result);
99
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
100
+ class ForwardIterator>
101
+ ForwardIterator
102
+ set_intersection(ExecutionPolicy&& exec,
103
+ ForwardIterator1 first1, ForwardIterator1 last1,
104
+ ForwardIterator2 first2, ForwardIterator2 last2,
105
+ ForwardIterator result);
106
 
107
  template<class InputIterator1, class InputIterator2,
108
  class OutputIterator, class Compare>
109
  OutputIterator
110
  set_intersection(InputIterator1 first1, InputIterator1 last1,
111
  InputIterator2 first2, InputIterator2 last2,
112
  OutputIterator result, Compare comp);
113
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
114
+ class ForwardIterator, class Compare>
115
+ ForwardIterator
116
+ set_intersection(ExecutionPolicy&& exec,
117
+ ForwardIterator1 first1, ForwardIterator1 last1,
118
+ ForwardIterator2 first2, ForwardIterator2 last2,
119
+ ForwardIterator result, Compare comp);
120
  ```
121
 
122
+ *Requires:* The resulting range shall not overlap with either of the
123
+ original ranges.
124
+
125
  *Effects:* Constructs a sorted intersection of the elements from the two
126
  ranges; that is, the set of elements that are present in both of the
127
  ranges.
128
 
 
 
 
129
  *Returns:* The end of the constructed range.
130
 
131
  *Complexity:* At most `2 * ((last1 - first1) + (last2 - first2)) - 1`
132
  comparisons.
133
 
 
143
  class OutputIterator>
144
  OutputIterator
145
  set_difference(InputIterator1 first1, InputIterator1 last1,
146
  InputIterator2 first2, InputIterator2 last2,
147
  OutputIterator result);
148
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
149
+ class ForwardIterator>
150
+ ForwardIterator
151
+ set_difference(ExecutionPolicy&& exec,
152
+ ForwardIterator1 first1, ForwardIterator1 last1,
153
+ ForwardIterator2 first2, ForwardIterator2 last2,
154
+ ForwardIterator result);
155
 
156
  template<class InputIterator1, class InputIterator2,
157
  class OutputIterator, class Compare>
158
  OutputIterator
159
  set_difference(InputIterator1 first1, InputIterator1 last1,
160
  InputIterator2 first2, InputIterator2 last2,
161
  OutputIterator result, Compare comp);
162
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
163
+ class ForwardIterator, class Compare>
164
+ ForwardIterator
165
+ set_difference(ExecutionPolicy&& exec,
166
+ ForwardIterator1 first1, ForwardIterator1 last1,
167
+ ForwardIterator2 first2, ForwardIterator2 last2,
168
+ ForwardIterator result, Compare comp);
169
  ```
170
 
171
+ *Requires:* The resulting range shall not overlap with either of the
172
+ original ranges.
173
+
174
  *Effects:* Copies the elements of the range \[`first1`, `last1`) which
175
  are not present in the range \[`first2`, `last2`) to the range beginning
176
  at `result`. The elements in the constructed range are sorted.
177
 
 
 
 
178
  *Returns:* The end of the constructed range.
179
 
180
  *Complexity:* At most `2 * ((last1 - first1) + (last2 - first2)) - 1`
181
  comparisons.
182
 
 
192
  class OutputIterator>
193
  OutputIterator
194
  set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
195
  InputIterator2 first2, InputIterator2 last2,
196
  OutputIterator result);
197
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
198
+ class ForwardIterator>
199
+ ForwardIterator
200
+ set_symmetric_difference(ExecutionPolicy&& exec,
201
+ ForwardIterator1 first1, ForwardIterator1 last1,
202
+ ForwardIterator2 first2, ForwardIterator2 last2,
203
+ ForwardIterator result);
204
 
205
  template<class InputIterator1, class InputIterator2,
206
  class OutputIterator, class Compare>
207
  OutputIterator
208
  set_symmetric_difference(InputIterator1 first1, InputIterator1 last1,
209
  InputIterator2 first2, InputIterator2 last2,
210
  OutputIterator result, Compare comp);
211
+ template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2,
212
+ class ForwardIterator, class Compare>
213
+ ForwardIterator
214
+ set_symmetric_difference(ExecutionPolicy&& exec,
215
+ ForwardIterator1 first1, ForwardIterator1 last1,
216
+ ForwardIterator2 first2, ForwardIterator2 last2,
217
+ ForwardIterator result, Compare comp);
218
  ```
219
 
220
+ *Requires:* The resulting range shall not overlap with either of the
221
+ original ranges.
222
+
223
  *Effects:* Copies the elements of the range \[`first1`, `last1`) that
224
  are not present in the range \[`first2`, `last2`), and the elements of
225
  the range \[`first2`, `last2`) that are not present in the range
226
  \[`first1`, `last1`) to the range beginning at `result`. The elements in
227
  the constructed range are sorted.
228
 
 
 
 
229
  *Returns:* The end of the constructed range.
230
 
231
  *Complexity:* At most `2 * ((last1 - first1) + (last2 - first2)) - 1`
232
  comparisons.
233