diff options
| author | mikhnenko <[email protected]> | 2025-01-20 01:34:08 +0300 |
|---|---|---|
| committer | mikhnenko <[email protected]> | 2025-01-20 01:51:09 +0300 |
| commit | 2ab2ef14e493133a483a7210a0133c1d8918eee2 (patch) | |
| tree | b25a613d75999386160a0ffe41a4f69282a592b3 /contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h | |
| parent | 11def371ff569cef09101fa40c00e6180c3885bc (diff) | |
Update libcxx to 5 Mar 2024 80f9458cf30d13eef21b09042ea590945c5e64db
commit_hash:c45aa2ed98c2a01fa86b69bac97f40a32bd68ae2
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h')
| -rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h index 75f936d0f21..8557c76f80c 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/search.h @@ -117,17 +117,18 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __searc } } -template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2> +template <class _Iter1, + class _Sent1, + class _Iter2, + class _Sent2, + class _Pred, + class _Proj1, + class _Proj2, + __enable_if_t<__has_random_access_iterator_category<_Iter1>::value && + __has_random_access_iterator_category<_Iter2>::value, + int> = 0> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_impl( - _Iter1 __first1, - _Sent1 __last1, - _Iter2 __first2, - _Sent2 __last2, - _Pred& __pred, - _Proj1& __proj1, - _Proj2& __proj2, - __enable_if_t<__has_random_access_iterator_category<_Iter1>::value && - __has_random_access_iterator_category<_Iter2>::value>* = nullptr) { + _Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) { auto __size2 = __last2 - __first2; if (__size2 == 0) return std::make_pair(__first1, __first1); @@ -141,18 +142,20 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __searc __first1, __last1, __first2, __last2, __pred, __proj1, __proj2, __size1, __size2); } -template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2> -_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_impl( - _Iter1 __first1, - _Sent1 __last1, - _Iter2 __first2, - _Sent2 __last2, - _Pred& __pred, - _Proj1& __proj1, - _Proj2& __proj2, +template < + class _Iter1, + class _Sent1, + class _Iter2, + class _Sent2, + class _Pred, + class _Proj1, + class _Proj2, __enable_if_t<__has_forward_iterator_category<_Iter1>::value && __has_forward_iterator_category<_Iter2>::value && - !(__has_random_access_iterator_category<_Iter1>::value && - __has_random_access_iterator_category<_Iter2>::value)>* = nullptr) { + !(__has_random_access_iterator_category<_Iter1>::value && + __has_random_access_iterator_category<_Iter2>::value), + int> = 0> +_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_Iter1, _Iter1> __search_impl( + _Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) { return std::__search_forward_impl<_ClassicAlgPolicy>(__first1, __last1, __first2, __last2, __pred, __proj1, __proj2); } |
