ac73c944ea
This avoids including the whole of <functional> in <algorithm>, as the <pstl/glue_algorithm_defs.h> header only actually needs std::pair. This also avoids including <iterator> in <pstl/utils.h>, which only needs <type_traits>, std::bad_alloc, and std::terminate (which can be repalced with std::__terminate). This matters less, because <pstl/utils.h> is only included by the <pstl/*_impl.h> headers and they all use <iterator> anyway, and are only included by <execution>. libstdc++-v3/ChangeLog: PR libstdc++/92546 * include/pstl/glue_algorithm_defs.h: Replace <functional> with <bits/stl_pair.h>. * include/pstl/utils.h: Replace <iterator> with <type_traits>. (__pstl::__internal::__except_handler): Use std::__terminate instead of std::terminate. * src/c++17/fs_path.cc: Include <array>. * testsuite/25_algorithms/adjacent_find/constexpr.cc: Include <functional>. * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise. * testsuite/25_algorithms/clamp/constrained.cc: Likewise. * testsuite/25_algorithms/equal/constrained.cc: Likewise. * testsuite/25_algorithms/for_each/constrained.cc: Likewise. * testsuite/25_algorithms/includes/constrained.cc: Likewise. * testsuite/25_algorithms/is_heap/constexpr.cc: Likewise. * testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise. * testsuite/25_algorithms/is_permutation/constrained.cc: Include <iterator>. * testsuite/25_algorithms/is_sorted/constexpr.cc: Include <functional>. * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare/constrained.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc: Include <array>. * testsuite/25_algorithms/lower_bound/constexpr.cc: Include <functional>. * testsuite/25_algorithms/max/constrained.cc: Likewise. * testsuite/25_algorithms/max_element/constrained.cc: Likewise. * testsuite/25_algorithms/min/constrained.cc: Likewise. * testsuite/25_algorithms/min_element/constrained.cc: Likewise. * testsuite/25_algorithms/minmax_element/constrained.cc: Likewise. * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise. * testsuite/25_algorithms/move/93872.cc: Likewise. * testsuite/25_algorithms/move_backward/93872.cc: Include <iterator>. * testsuite/25_algorithms/nth_element/constexpr.cc: Include <functional>. * testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise. * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/search/constexpr.cc: Likewise. * testsuite/25_algorithms/search_n/constrained.cc: Likewise. * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise. * testsuite/25_algorithms/set_difference/constrained.cc: Likewise. * testsuite/25_algorithms/set_intersection/constexpr.cc: Likewise. * testsuite/25_algorithms/set_intersection/constrained.cc: Likewise. * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Likewise. * testsuite/25_algorithms/set_union/constexpr.cc: Likewise. * testsuite/25_algorithms/set_union/constrained.cc: Likewise. * testsuite/25_algorithms/sort/constexpr.cc: Likewise. * testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise. * testsuite/25_algorithms/transform/constrained.cc: Likewise. * testsuite/25_algorithms/unique/constexpr.cc: Likewise. * testsuite/25_algorithms/unique/constrained.cc: Likewise. * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise. * testsuite/std/ranges/adaptors/elements.cc: Include <vector>. * testsuite/std/ranges/adaptors/lazy_split.cc: Likewise. * testsuite/std/ranges/adaptors/split.cc: Likewise.
552 lines
32 KiB
C++
552 lines
32 KiB
C++
// -*- C++ -*-
|
|
//===-- glue_algorithm_defs.h ---------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef _PSTL_GLUE_ALGORITHM_DEFS_H
|
|
#define _PSTL_GLUE_ALGORITHM_DEFS_H
|
|
|
|
#include <bits/stl_pair.h>
|
|
|
|
#include "execution_defs.h"
|
|
|
|
namespace std
|
|
{
|
|
|
|
// [alg.any_of]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
any_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred);
|
|
|
|
// [alg.all_of]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
all_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred);
|
|
|
|
// [alg.none_of]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
none_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred);
|
|
|
|
// [alg.foreach]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Function>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
for_each(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Function __f);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Function>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
for_each_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n, _Function __f);
|
|
|
|
// [alg.find]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
find_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
find_if_not(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
|
|
|
|
// [alg.find.end]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1>
|
|
find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first,
|
|
_ForwardIterator2 __s_last, _BinaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1>
|
|
find_end(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first,
|
|
_ForwardIterator2 __s_last);
|
|
|
|
// [alg.find_first_of]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1>
|
|
find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
|
|
_ForwardIterator2 __s_first, _ForwardIterator2 __s_last, _BinaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1>
|
|
find_first_of(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
|
|
_ForwardIterator2 __s_first, _ForwardIterator2 __s_last);
|
|
|
|
// [alg.adjacent_find]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
adjacent_find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred);
|
|
|
|
// [alg.count]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy,
|
|
typename iterator_traits<_ForwardIterator>::difference_type>
|
|
count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Predicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy,
|
|
typename iterator_traits<_ForwardIterator>::difference_type>
|
|
count_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred);
|
|
|
|
// [alg.search]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1>
|
|
search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first,
|
|
_ForwardIterator2 __s_last, _BinaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator1>
|
|
search(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __s_first,
|
|
_ForwardIterator2 __s_last);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count,
|
|
const _Tp& __value, _BinaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
search_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Size __count,
|
|
const _Tp& __value);
|
|
|
|
// [alg.copy]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
copy_n(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _Size __n, _ForwardIterator2 __result);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 result,
|
|
_Predicate __pred);
|
|
|
|
// [alg.swap]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
swap_ranges(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2);
|
|
|
|
// [alg.transform]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryOperation>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
|
|
_UnaryOperation __op);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator,
|
|
class _BinaryOperation>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
transform(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator __result, _BinaryOperation __op);
|
|
|
|
// [alg.replace]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
replace_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred,
|
|
const _Tp& __new_value);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
replace(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value,
|
|
const _Tp& __new_value);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _UnaryPredicate, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
replace_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
|
|
_ForwardIterator2 __result, _UnaryPredicate __pred, const _Tp& __new_value);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
replace_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
|
|
const _Tp& __old_value, const _Tp& __new_value);
|
|
|
|
// [alg.fill]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
fill_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __count, const _Tp& __value);
|
|
|
|
// [alg.generate]
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Generator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
generate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Generator __g);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Size, class _Generator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
generate_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size count, _Generator __g);
|
|
|
|
// [alg.remove]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Predicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
remove_copy_if(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last,
|
|
_ForwardIterator2 __result, _Predicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
remove_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
|
|
const _Tp& __value);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
remove_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Tp>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
remove(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
|
|
|
|
// [alg.unique]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result,
|
|
_BinaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
unique_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result);
|
|
|
|
// [alg.reverse]
|
|
|
|
template <class _ExecutionPolicy, class _BidirectionalIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
|
|
|
|
template <class _ExecutionPolicy, class _BidirectionalIterator, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
reverse_copy(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last,
|
|
_ForwardIterator __d_first);
|
|
|
|
// [alg.rotate]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
rotate_copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __middle, _ForwardIterator1 __last,
|
|
_ForwardIterator2 __result);
|
|
|
|
// [alg.partitions]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
is_partitioned(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _UnaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
partition(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _BidirectionalIterator, class _UnaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _BidirectionalIterator>
|
|
stable_partition(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last,
|
|
_UnaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _ForwardIterator1, class _ForwardIterator2,
|
|
class _UnaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>>
|
|
partition_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last,
|
|
_ForwardIterator1 __out_true, _ForwardIterator2 __out_false, _UnaryPredicate __pred);
|
|
|
|
// [alg.sort]
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
|
|
|
|
// [stable.sort]
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
|
|
|
|
// [mismatch]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>>
|
|
mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2, _BinaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>>
|
|
mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_BinaryPredicate __pred);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>>
|
|
mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator1, _ForwardIterator2>>
|
|
mismatch(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2);
|
|
|
|
// [alg.equal]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_BinaryPredicate __p);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2, _BinaryPredicate __p);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2);
|
|
|
|
// [alg.move]
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
|
|
move(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __d_first);
|
|
|
|
// [partial.sort]
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle,
|
|
_RandomAccessIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle,
|
|
_RandomAccessIterator __last);
|
|
|
|
// [partial.sort.copy]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator>
|
|
partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last,
|
|
_RandomAccessIterator __d_first, _RandomAccessIterator __d_last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _RandomAccessIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator>
|
|
partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last,
|
|
_RandomAccessIterator __d_first, _RandomAccessIterator __d_last);
|
|
|
|
// [is.sorted]
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
is_sorted_until(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
is_sorted(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
|
|
|
|
// [alg.nth.element]
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth,
|
|
_RandomAccessIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth,
|
|
_RandomAccessIterator __last);
|
|
|
|
// [alg.merge]
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator,
|
|
class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2, _ForwardIterator __d_first, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
merge(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2, _ForwardIterator __d_first);
|
|
|
|
template <class _ExecutionPolicy, class _BidirectionalIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle,
|
|
_BidirectionalIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _BidirectionalIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void>
|
|
inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle,
|
|
_BidirectionalIterator __last);
|
|
|
|
// [includes]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2);
|
|
|
|
// [set.union]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator,
|
|
class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
set_union(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
|
|
_ForwardIterator2 __last2, _ForwardIterator __result);
|
|
|
|
// [set.intersection]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator,
|
|
class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
set_intersection(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result);
|
|
|
|
// [set.difference]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator,
|
|
class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
set_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result);
|
|
|
|
// [set.symmetric.difference]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator,
|
|
class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator result,
|
|
_Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
set_symmetric_difference(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _ForwardIterator __result);
|
|
|
|
// [is.heap]
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator>
|
|
is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _RandomAccessIterator>
|
|
is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _RandomAccessIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
is_heap(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
|
|
|
|
// [alg.min.max]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
min_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator>
|
|
max_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>>
|
|
minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, std::pair<_ForwardIterator, _ForwardIterator>>
|
|
minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last);
|
|
|
|
// [alg.lex.comparison]
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Compare>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2, _Compare __comp);
|
|
|
|
template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2>
|
|
__pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool>
|
|
lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
|
|
_ForwardIterator2 __first2, _ForwardIterator2 __last2);
|
|
|
|
} // namespace std
|
|
#endif /* _PSTL_GLUE_ALGORITHM_DEFS_H */
|