diff options
author | Konstantin Varlamov <varconst@apple.com> | 2022-07-18 21:05:51 -0700 |
---|---|---|
committer | Konstantin Varlamov <varconst@apple.com> | 2022-07-18 21:06:17 -0700 |
commit | 8ed702b83f20d0ec117264a8e7776098ae956250 (patch) | |
tree | 465b12828e167a04c9f904c9de2575669c17c0c6 /libcxx/include/__algorithm/iterator_operations.h | |
parent | 67220c2ad72e32cea18bb261366e64fe5de75b16 (diff) | |
download | llvm-8ed702b83f20d0ec117264a8e7776098ae956250.tar.gz |
[libc++][ranges] Implement `ranges::{,stable_}partition`.
Differential Revision: https://reviews.llvm.org/D129624
Diffstat (limited to 'libcxx/include/__algorithm/iterator_operations.h')
-rw-r--r-- | libcxx/include/__algorithm/iterator_operations.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcxx/include/__algorithm/iterator_operations.h b/libcxx/include/__algorithm/iterator_operations.h index de9c8a130ecb..03dd2c41e94a 100644 --- a/libcxx/include/__algorithm/iterator_operations.h +++ b/libcxx/include/__algorithm/iterator_operations.h @@ -87,6 +87,13 @@ struct _IterOps<_ClassicAlgPolicy> { template <class _Iter> _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11 + __uncvref_t<_Iter> next(_Iter&& __it, + typename iterator_traits<__uncvref_t<_Iter> >::difference_type __n = 1){ + return std::next(std::forward<_Iter>(__it), __n); + } + + template <class _Iter> + _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11 void __advance_to(_Iter& __first, _Iter __last) { __first = __last; } |