diff options
author | Jonathan Helgert <jhelgert@users.noreply.github.com> | 2021-11-18 18:20:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-18 18:20:34 +0100 |
commit | b1f6f207757214e5b184694b1a52e29c6df539d2 (patch) | |
tree | 1696eb2efb5eb0930932537a1d6d8cf1c15a44ed /Cython/Includes/libcpp | |
parent | e9503188b27cff99bdb42d882a6fcd95be8daf40 (diff) | |
download | cython-b1f6f207757214e5b184694b1a52e29c6df539d2.tar.gz |
Add merge and set operations of the C++ algorithm library (GH-4462)
Disable on macOS due to bug in Apple clang++. See https://github.com/cython/cython/pull/4448#issuecomment-964405071
Diffstat (limited to 'Cython/Includes/libcpp')
-rw-r--r-- | Cython/Includes/libcpp/algorithm.pxd | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Cython/Includes/libcpp/algorithm.pxd b/Cython/Includes/libcpp/algorithm.pxd index a81c44a96..8373a94ea 100644 --- a/Cython/Includes/libcpp/algorithm.pxd +++ b/Cython/Includes/libcpp/algorithm.pxd @@ -226,8 +226,45 @@ cdef extern from "<algorithm>" namespace "std" nogil: bool binary_search[ExecutionPolicy, Iter, T, Compare](ExecutionPolicy&& policy, Iter first, Iter last, const T& value, Compare comp) except + # Other operations on sorted ranges + OutputIt merge[InputIt1, InputIt2, OutputIt]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out) except + + OutputIt merge[InputIt1, InputIt2, OutputIt, Compare]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out, Compare comp) except + + + void inplace_merge[BidirIt](BidirIt first, BidirIt middle, BidirIt last) except + + void inplace_merge[BidirIt, Compare](BidirIt first, BidirIt middle, BidirIt last, Compare comp) except + # Set operations (on sorted ranges) + bool includes[InputIt1, InputIt2]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) except + + + bool includes[InputIt1, InputIt2, Compare]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, Compare comp) except + + + OutputIt set_difference[InputIt1, InputIt2, OutputIt]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out) except + + + OutputIt set_difference[InputIt1, InputIt2, OutputIt, Compare]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, + OutputIt out, Compare comp) except + + + OutputIt set_intersection[InputIt1, InputIt2, OutputIt]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out) except + + + OutputIt set_intersection[InputIt1, InputIt2, OutputIt, Compare]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out, Compare comp) except + + + OutputIt set_symmetric_difference[InputIt1, InputIt2, OutputIt]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out) except + + + OutputIt set_symmetric_difference[InputIt1, InputIt2, OutputIt, Compare]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out, Compare comp) except + + + OutputIt set_union[InputIt1, InputIt2, OutputIt]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out) except + + + OutputIt set_union[InputIt1, InputIt2, OutputIt, Compare]( + InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt out, Compare comp) except + # Heap operations void make_heap[Iter](Iter first, Iter last) except + |