diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-04 19:20:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-08 19:02:26 +0000 |
commit | 81ad626541db97eb356e2c1d4a20eb2a26a766ab (patch) | |
tree | 311b6a8987c32b1e1dcbab65c54cfac3fdb56175 /contrib/llvm-project/libcxx/include/__algorithm/stable_partition.h | |
parent | 5fff09660e06a66bed6482da9c70df328e16bbb6 (diff) | |
parent | 145449b1e420787bb99721a429341fa6be3adfb6 (diff) |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/stable_partition.h')
-rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/stable_partition.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/stable_partition.h b/contrib/llvm-project/libcxx/include/__algorithm/stable_partition.h index 331f0fde77dc..969ac7a6173e 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/stable_partition.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/stable_partition.h @@ -11,12 +11,14 @@ #include <__algorithm/rotate.h> #include <__config> +#include <__iterator/advance.h> +#include <__iterator/distance.h> #include <__iterator/iterator_traits.h> #include <__utility/swap.h> #include <memory> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header +# pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD @@ -130,7 +132,10 @@ __stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate unique_ptr<value_type, __return_temporary_buffer> __h; if (__len >= __alloc_limit) { +// TODO: Remove the use of std::get_temporary_buffer +_LIBCPP_SUPPRESS_DEPRECATED_PUSH __p = _VSTD::get_temporary_buffer<value_type>(__len); +_LIBCPP_SUPPRESS_DEPRECATED_POP __h.reset(__p.first); } return _VSTD::__stable_partition<_Predicate&>(__first, __last, __pred, __len, __p, forward_iterator_tag()); @@ -276,7 +281,10 @@ __stable_partition(_BidirectionalIterator __first, _BidirectionalIterator __last unique_ptr<value_type, __return_temporary_buffer> __h; if (__len >= __alloc_limit) { +// TODO: Remove the use of std::get_temporary_buffer +_LIBCPP_SUPPRESS_DEPRECATED_PUSH __p = _VSTD::get_temporary_buffer<value_type>(__len); +_LIBCPP_SUPPRESS_DEPRECATED_POP __h.reset(__p.first); } return _VSTD::__stable_partition<_Predicate&>(__first, __last, __pred, __len, __p, bidirectional_iterator_tag()); |