diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-04-14 21:41:27 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-06-22 18:20:56 +0000 | 
| commit | bdd1243df58e60e85101c09001d9812a789b6bc4 (patch) | |
| tree | a1ce621c7301dd47ba2ddc3b8eaa63b441389481 /contrib/llvm-project/libcxx/include/__algorithm/ranges_search_n.h | |
| parent | 781624ca2d054430052c828ba8d2c2eaf2d733e7 (diff) | |
| parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/ranges_search_n.h')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/ranges_search_n.h | 17 | 
1 files changed, 7 insertions, 10 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/ranges_search_n.h b/contrib/llvm-project/libcxx/include/__algorithm/ranges_search_n.h index 29fdbfb1c725..56ec8f33d431 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/ranges_search_n.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/ranges_search_n.h @@ -25,12 +25,13 @@  #include <__ranges/size.h>  #include <__ranges/subrange.h>  #include <__utility/move.h> +#include <__utility/pair.h>  #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)  #  pragma GCC system_header  #endif -#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) +#if _LIBCPP_STD_VER > 17  _LIBCPP_BEGIN_NAMESPACE_STD @@ -52,12 +53,8 @@ struct __fn {        }        if constexpr (random_access_iterator<_Iter1>) { -        auto __ret = __search_n_random_access_impl<_RangeAlgPolicy>(__first, __last, -                                                                    __count, -                                                                    __value, -                                                                    __pred, -                                                                    __proj, -                                                                    __size); +        auto __ret = std::__search_n_random_access_impl<_RangeAlgPolicy>( +            __first, __last, __count, __value, __pred, __proj, __size);          return {std::move(__ret.first), std::move(__ret.second)};        }      } @@ -75,7 +72,7 @@ struct __fn {              class _Pred = ranges::equal_to,              class _Proj = identity>      requires indirectly_comparable<_Iter, const _Type*, _Pred, _Proj> -  _LIBCPP_HIDE_FROM_ABI constexpr +  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr    subrange<_Iter> operator()(_Iter __first, _Sent __last,                               iter_difference_t<_Iter> __count,                               const _Type& __value, @@ -86,7 +83,7 @@ struct __fn {    template <forward_range _Range, class _Type, class _Pred = ranges::equal_to, class _Proj = identity>      requires indirectly_comparable<iterator_t<_Range>, const _Type*, _Pred, _Proj> -  _LIBCPP_HIDE_FROM_ABI constexpr +  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr    borrowed_subrange_t<_Range> operator()(_Range&& __range,                                           range_difference_t<_Range> __count,                                           const _Type& __value, @@ -115,6 +112,6 @@ inline namespace __cpo {  _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) +#endif // _LIBCPP_STD_VER > 17  #endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H  | 
