@@ -43,7 +43,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
43
43
// generic implementation
44
44
template <class _Iter , class _Sent , class _Tp , class _Proj >
45
45
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Iter
46
- __find_impl (_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
46
+ __find (_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) {
47
47
for (; __first != __last; ++__first)
48
48
if (std::__invoke (__proj, *__first) == __value)
49
49
break ;
@@ -57,8 +57,7 @@ template <class _Tp,
57
57
__enable_if_t <__is_identity<_Proj>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value &&
58
58
sizeof (_Tp) == 1 ,
59
59
int > = 0 >
60
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp*
61
- __find_impl (_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
60
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find (_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
62
61
if (auto __ret = std::__constexpr_memchr (__first, __value, __last - __first))
63
62
return __ret;
64
63
return __last;
@@ -71,8 +70,7 @@ template <class _Tp,
71
70
__enable_if_t <__is_identity<_Proj>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value &&
72
71
sizeof (_Tp) == sizeof (wchar_t ) && _LIBCPP_ALIGNOF(_Tp) >= _LIBCPP_ALIGNOF(wchar_t ),
73
72
int > = 0 >
74
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp*
75
- __find_impl (_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
73
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find (_Tp* __first, _Tp* __last, const _Up& __value, _Proj&) {
76
74
if (auto __ret = std::__constexpr_wmemchr (__first, __value, __last - __first))
77
75
return __ret;
78
76
return __last;
@@ -89,10 +87,10 @@ template <class _Tp,
89
87
is_signed<_Tp>::value == is_signed<_Up>::value,
90
88
int > = 0 >
91
89
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp*
92
- __find_impl (_Tp* __first, _Tp* __last, const _Up& __value, _Proj& __proj) {
90
+ __find (_Tp* __first, _Tp* __last, const _Up& __value, _Proj& __proj) {
93
91
if (__value < numeric_limits<_Tp>::min () || __value > numeric_limits<_Tp>::max ())
94
92
return __last;
95
- return std::__find_impl (__first, __last, _Tp (__value), __proj);
93
+ return std::__find (__first, __last, _Tp (__value), __proj);
96
94
}
97
95
98
96
// __bit_iterator implementation
@@ -134,7 +132,7 @@ __find_bool(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
134
132
135
133
template <class _Cp , bool _IsConst, class _Tp , class _Proj , __enable_if_t <__is_identity<_Proj>::value, int > = 0 >
136
134
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __bit_iterator<_Cp, _IsConst>
137
- __find_impl (__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value, _Proj&) {
135
+ __find (__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value, _Proj&) {
138
136
if (static_cast <bool >(__value))
139
137
return std::__find_bool<true >(__first, static_cast <typename _Cp::size_type>(__last - __first));
140
138
return std::__find_bool<false >(__first, static_cast <typename _Cp::size_type>(__last - __first));
@@ -150,7 +148,7 @@ template <class _SegmentedIterator,
150
148
class _Proj ,
151
149
__enable_if_t <__is_segmented_iterator<_SegmentedIterator>::value, int > = 0 >
152
150
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _SegmentedIterator
153
- __find_impl (_SegmentedIterator __first, _SegmentedIterator __last, const _Tp& __value, _Proj& __proj) {
151
+ __find (_SegmentedIterator __first, _SegmentedIterator __last, const _Tp& __value, _Proj& __proj) {
154
152
return std::__find_segment_if (std::move (__first), std::move (__last), __find_segment<_Tp>(__value), __proj);
155
153
}
156
154
@@ -163,7 +161,7 @@ struct __find_segment {
163
161
template <class _InputIterator , class _Proj >
164
162
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _InputIterator
165
163
operator ()(_InputIterator __first, _InputIterator __last, _Proj& __proj) const {
166
- return std::__find_impl (__first, __last, __value_, __proj);
164
+ return std::__find (__first, __last, __value_, __proj);
167
165
}
168
166
};
169
167
@@ -173,7 +171,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _In
173
171
find (_InputIterator __first, _InputIterator __last, const _Tp& __value) {
174
172
__identity __proj;
175
173
return std::__rewrap_iter (
176
- __first, std::__find_impl (std::__unwrap_iter (__first), std::__unwrap_iter (__last), __value, __proj));
174
+ __first, std::__find (std::__unwrap_iter (__first), std::__unwrap_iter (__last), __value, __proj));
177
175
}
178
176
179
177
_LIBCPP_END_NAMESPACE_STD
0 commit comments