1 | // -*- C++ -*- |
2 | //===-- glue_algorithm_defs.h ---------------------------------------------===// |
3 | // |
4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
5 | // See https://llvm.org/LICENSE.txt for license information. |
6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
7 | // |
8 | //===----------------------------------------------------------------------===// |
9 | |
10 | #ifndef _PSTL_GLUE_ALGORITHM_DEFS_H |
11 | #define _PSTL_GLUE_ALGORITHM_DEFS_H |
12 | |
13 | #include <functional> |
14 | |
15 | #include "execution_defs.h" |
16 | |
17 | namespace std |
18 | { |
19 | |
20 | // [alg.any_of] |
21 | |
22 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> |
23 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
24 | any_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); |
25 | |
26 | // [alg.all_of] |
27 | |
28 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> |
29 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
30 | all_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); |
31 | |
32 | // [alg.none_of] |
33 | |
34 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> |
35 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
36 | none_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); |
37 | |
38 | // [alg.foreach] |
39 | |
40 | template <class _ExecutionPolicy, class _ForwardIterator, class _Function> |
41 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
42 | for_each(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Function __f); |
43 | |
44 | template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Function> |
45 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
46 | for_each_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n, _Function __f); |
47 | |
48 | // [alg.find] |
49 | |
50 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> |
51 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
52 | find_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); |
53 | |
54 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> |
55 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
56 | find_if_not(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); |
57 | |
58 | template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> |
59 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); |
61 | |
62 | // [alg.find.end] |
63 | |
64 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
65 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> |
66 | find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, |
67 | _ForwardIterator2 __s_last, _BinaryPredicate __pred); |
68 | |
69 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
70 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> |
71 | find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, |
72 | _ForwardIterator2 __s_last); |
73 | |
74 | // [alg.find_first_of] |
75 | |
76 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
77 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> |
78 | find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, |
79 | _ForwardIterator2 __s_first, _ForwardIterator2 __s_last, _BinaryPredicate __pred); |
80 | |
81 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
82 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> |
83 | find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, |
84 | _ForwardIterator2 __s_first, _ForwardIterator2 __s_last); |
85 | |
86 | // [alg.adjacent_find] |
87 | |
88 | template <class _ExecutionPolicy, class _ForwardIterator> |
89 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
90 | adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); |
91 | |
92 | template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate> |
93 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
94 | adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred); |
95 | |
96 | // [alg.count] |
97 | |
98 | template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> |
99 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, |
100 | typename iterator_traits<_ForwardIterator>::difference_type> |
101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); |
102 | |
103 | template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate> |
104 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, |
105 | typename iterator_traits<_ForwardIterator>::difference_type> |
106 | count_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred); |
107 | |
108 | // [alg.search] |
109 | |
110 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
111 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> |
112 | search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, |
113 | _ForwardIterator2 __s_last, _BinaryPredicate __pred); |
114 | |
115 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
116 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1> |
117 | search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first, |
118 | _ForwardIterator2 __s_last); |
119 | |
120 | template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate> |
121 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
122 | search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count, |
123 | const _Tp& __value, _BinaryPredicate __pred); |
124 | |
125 | template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp> |
126 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
127 | search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count, |
128 | const _Tp& __value); |
129 | |
130 | // [alg.copy] |
131 | |
132 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
133 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
134 | copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); |
135 | |
136 | template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2> |
137 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
138 | copy_n(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _Size __n, _ForwardIterator2 __result); |
139 | |
140 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate> |
141 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
142 | copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 result, |
143 | _Predicate __pred); |
144 | |
145 | // [alg.swap] |
146 | |
147 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
148 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
149 | swap_ranges(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
150 | _ForwardIterator2 __first2); |
151 | |
152 | // [alg.transform] |
153 | |
154 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation> |
155 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
156 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, |
157 | _UnaryOperation __op); |
158 | |
159 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, |
160 | class _BinaryOperation> |
161 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
162 | transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
163 | _ForwardIterator __result, _BinaryOperation __op); |
164 | |
165 | // [alg.replace] |
166 | |
167 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _Tp> |
168 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
169 | replace_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred, |
170 | const _Tp& __new_value); |
171 | |
172 | template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> |
173 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
174 | replace(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, |
175 | const _Tp& __new_value); |
176 | |
177 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryPredicate, class _Tp> |
178 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
179 | replace_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, |
180 | _ForwardIterator2 __result, _UnaryPredicate __pred, const _Tp& __new_value); |
181 | |
182 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp> |
183 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
184 | replace_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, |
185 | const _Tp& __old_value, const _Tp& __new_value); |
186 | |
187 | // [alg.fill] |
188 | |
189 | template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> |
190 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
191 | fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); |
192 | |
193 | template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp> |
194 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
195 | fill_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __count, const _Tp& __value); |
196 | |
197 | // [alg.generate] |
198 | template <class _ExecutionPolicy, class _ForwardIterator, class _Generator> |
199 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
200 | generate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Generator __g); |
201 | |
202 | template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Generator> |
203 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
204 | generate_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size count, _Generator __g); |
205 | |
206 | // [alg.remove] |
207 | |
208 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate> |
209 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
210 | remove_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, |
211 | _ForwardIterator2 __result, _Predicate __pred); |
212 | |
213 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp> |
214 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
215 | remove_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, |
216 | const _Tp& __value); |
217 | |
218 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate> |
219 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
220 | remove_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); |
221 | |
222 | template <class _ExecutionPolicy, class _ForwardIterator, class _Tp> |
223 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
224 | remove(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value); |
225 | |
226 | // [alg.unique] |
227 | |
228 | template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate> |
229 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
230 | unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred); |
231 | |
232 | template <class _ExecutionPolicy, class _ForwardIterator> |
233 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
234 | unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); |
235 | |
236 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
237 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
238 | unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result, |
239 | _BinaryPredicate __pred); |
240 | |
241 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
242 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
243 | unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result); |
244 | |
245 | // [alg.reverse] |
246 | |
247 | template <class _ExecutionPolicy, class _BidirectionalIterator> |
248 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last); |
250 | |
251 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _ForwardIterator> |
252 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
253 | reverse_copy(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, |
254 | _ForwardIterator __d_first); |
255 | |
256 | // [alg.rotate] |
257 | |
258 | template <class _ExecutionPolicy, class _ForwardIterator> |
259 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
260 | rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last); |
261 | |
262 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
263 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
264 | rotate_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __middle, _ForwardIterator1 __last, |
265 | _ForwardIterator2 __result); |
266 | |
267 | // [alg.partitions] |
268 | |
269 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate> |
270 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
271 | is_partitioned(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); |
272 | |
273 | template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate> |
274 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
275 | partition(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred); |
276 | |
277 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _UnaryPredicate> |
278 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _BidirectionalIterator> |
279 | stable_partition(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, |
280 | _UnaryPredicate __pred); |
281 | |
282 | template <class _ExecutionPolicy, class _ForwardIterator, class _ForwardIterator1, class _ForwardIterator2, |
283 | class _UnaryPredicate> |
284 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> |
285 | partition_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, |
286 | _ForwardIterator1 __out_true, _ForwardIterator2 __out_false, _UnaryPredicate __pred); |
287 | |
288 | // [alg.sort] |
289 | |
290 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> |
291 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); |
293 | |
294 | template <class _ExecutionPolicy, class _RandomAccessIterator> |
295 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); |
297 | |
298 | // [stable.sort] |
299 | |
300 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> |
301 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
302 | stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); |
303 | |
304 | template <class _ExecutionPolicy, class _RandomAccessIterator> |
305 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
306 | stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); |
307 | |
308 | // [mismatch] |
309 | |
310 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
311 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> |
312 | mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
313 | _ForwardIterator2 __last2, _BinaryPredicate __pred); |
314 | |
315 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
316 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> |
317 | mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
318 | _BinaryPredicate __pred); |
319 | |
320 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
321 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> |
322 | mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
323 | _ForwardIterator2 __last2); |
324 | |
325 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
326 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>> |
327 | mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2); |
328 | |
329 | // [alg.equal] |
330 | |
331 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
332 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
333 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
334 | _BinaryPredicate __p); |
335 | |
336 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
337 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
338 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2); |
339 | |
340 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> |
341 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
342 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
343 | _ForwardIterator2 __last2, _BinaryPredicate __p); |
344 | |
345 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
346 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
347 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
348 | _ForwardIterator2 __last2); |
349 | |
350 | // [alg.move] |
351 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
352 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> |
353 | move(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first); |
354 | |
355 | // [partial.sort] |
356 | |
357 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> |
358 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
359 | partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, |
360 | _RandomAccessIterator __last, _Compare __comp); |
361 | |
362 | template <class _ExecutionPolicy, class _RandomAccessIterator> |
363 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
364 | partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, |
365 | _RandomAccessIterator __last); |
366 | |
367 | // [partial.sort.copy] |
368 | |
369 | template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator, class _Compare> |
370 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> |
371 | partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, |
372 | _RandomAccessIterator __d_first, _RandomAccessIterator __d_last, _Compare __comp); |
373 | |
374 | template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator> |
375 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> |
376 | partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, |
377 | _RandomAccessIterator __d_first, _RandomAccessIterator __d_last); |
378 | |
379 | // [is.sorted] |
380 | template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> |
381 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
382 | is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); |
383 | |
384 | template <class _ExecutionPolicy, class _ForwardIterator> |
385 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
386 | is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); |
387 | |
388 | template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> |
389 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
390 | is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); |
391 | |
392 | template <class _ExecutionPolicy, class _ForwardIterator> |
393 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
394 | is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); |
395 | |
396 | // [alg.nth.element] |
397 | |
398 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> |
399 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
400 | nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, |
401 | _RandomAccessIterator __last, _Compare __comp); |
402 | |
403 | template <class _ExecutionPolicy, class _RandomAccessIterator> |
404 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
405 | nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, |
406 | _RandomAccessIterator __last); |
407 | |
408 | // [alg.merge] |
409 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, |
410 | class _Compare> |
411 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
412 | merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
413 | _ForwardIterator2 __last2, _ForwardIterator __d_first, _Compare __comp); |
414 | |
415 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> |
416 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
417 | merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
418 | _ForwardIterator2 __last2, _ForwardIterator __d_first); |
419 | |
420 | template <class _ExecutionPolicy, class _BidirectionalIterator, class _Compare> |
421 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
422 | inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, |
423 | _BidirectionalIterator __last, _Compare __comp); |
424 | |
425 | template <class _ExecutionPolicy, class _BidirectionalIterator> |
426 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> |
427 | inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, |
428 | _BidirectionalIterator __last); |
429 | |
430 | // [includes] |
431 | |
432 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare> |
433 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
434 | includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
435 | _ForwardIterator2 __last2, _Compare __comp); |
436 | |
437 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
438 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
439 | includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
440 | _ForwardIterator2 __last2); |
441 | |
442 | // [set.union] |
443 | |
444 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, |
445 | class _Compare> |
446 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
447 | set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
448 | _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); |
449 | |
450 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> |
451 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
452 | set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, |
453 | _ForwardIterator2 __last2, _ForwardIterator __result); |
454 | |
455 | // [set.intersection] |
456 | |
457 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, |
458 | class _Compare> |
459 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
460 | set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
461 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); |
462 | |
463 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> |
464 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
465 | set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
466 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); |
467 | |
468 | // [set.difference] |
469 | |
470 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, |
471 | class _Compare> |
472 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
473 | set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
474 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp); |
475 | |
476 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> |
477 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
478 | set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
479 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); |
480 | |
481 | // [set.symmetric.difference] |
482 | |
483 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator, |
484 | class _Compare> |
485 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
486 | set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
487 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator result, |
488 | _Compare __comp); |
489 | |
490 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator> |
491 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
492 | set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
493 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result); |
494 | |
495 | // [is.heap] |
496 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> |
497 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> |
498 | is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); |
499 | |
500 | template <class _ExecutionPolicy, class _RandomAccessIterator> |
501 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator> |
502 | is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); |
503 | |
504 | template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> |
505 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
506 | is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); |
507 | |
508 | template <class _ExecutionPolicy, class _RandomAccessIterator> |
509 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
510 | is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); |
511 | |
512 | // [alg.min.max] |
513 | |
514 | template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> |
515 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
516 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); |
517 | |
518 | template <class _ExecutionPolicy, class _ForwardIterator> |
519 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
520 | min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); |
521 | |
522 | template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> |
523 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
524 | max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); |
525 | |
526 | template <class _ExecutionPolicy, class _ForwardIterator> |
527 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> |
528 | max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); |
529 | |
530 | template <class _ExecutionPolicy, class _ForwardIterator, class _Compare> |
531 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>> |
532 | minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp); |
533 | |
534 | template <class _ExecutionPolicy, class _ForwardIterator> |
535 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>> |
536 | minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last); |
537 | |
538 | // [alg.lex.comparison] |
539 | |
540 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare> |
541 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
542 | lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
543 | _ForwardIterator2 __first2, _ForwardIterator2 __last2, _Compare __comp); |
544 | |
545 | template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> |
546 | __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> |
547 | lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, |
548 | _ForwardIterator2 __first2, _ForwardIterator2 __last2); |
549 | |
550 | } // namespace std |
551 | #endif /* _PSTL_GLUE_ALGORITHM_DEFS_H */ |
552 | |