@@ -66,65 +66,6 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first
6666 return std::equal (__first1, __last1, __first2, __equal_to ());
6767}
6868
69- #if _LIBCPP_STD_VER >= 14
70-
71- template <class _Iter1 , class _Sent1 , class _Iter2 , class _Sent2 , class _Pred , class _Proj1 , class _Proj2 >
72- _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool __equal_impl (
73- _Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2, _Pred& __comp, _Proj1& __proj1, _Proj2& __proj2) {
74- while (__first1 != __last1 && __first2 != __last2) {
75- if (!std::__invoke (__comp, std::__invoke (__proj1, *__first1), std::__invoke (__proj2, *__first2)))
76- return false ;
77- ++__first1;
78- ++__first2;
79- }
80- return __first1 == __last1 && __first2 == __last2;
81- }
82-
83- template <class _Tp ,
84- class _Up ,
85- class _Pred ,
86- class _Proj1 ,
87- class _Proj2 ,
88- __enable_if_t <__desugars_to_v<__equal_tag, _Pred, _Tp, _Up> && __is_identity<_Proj1>::value &&
89- __is_identity<_Proj2>::value && !is_volatile<_Tp>::value && !is_volatile<_Up>::value &&
90- __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value,
91- int > = 0 >
92- _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
93- __equal_impl (_Tp* __first1, _Tp* __last1, _Up* __first2, _Up*, _Pred&, _Proj1&, _Proj2&) {
94- return std::__constexpr_memcmp_equal (__first1, __first2, __element_count (__last1 - __first1));
95- }
96-
97- template <class _InputIterator1 , class _InputIterator2 , class _BinaryPredicate >
98- _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
99- equal (_InputIterator1 __first1,
100- _InputIterator1 __last1,
101- _InputIterator2 __first2,
102- _InputIterator2 __last2,
103- _BinaryPredicate __pred) {
104- if constexpr (__has_random_access_iterator_category<_InputIterator1>::value &&
105- __has_random_access_iterator_category<_InputIterator2>::value) {
106- if (std::distance (__first1, __last1) != std::distance (__first2, __last2))
107- return false ;
108- }
109- __identity __proj;
110- return std::__equal_impl (
111- std::__unwrap_iter (__first1),
112- std::__unwrap_iter (__last1),
113- std::__unwrap_iter (__first2),
114- std::__unwrap_iter (__last2),
115- __pred,
116- __proj,
117- __proj);
118- }
119-
120- template <class _InputIterator1 , class _InputIterator2 >
121- _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
122- equal (_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
123- return std::equal (__first1, __last1, __first2, __last2, __equal_to ());
124- }
125-
126- #endif // _LIBCPP_STD_VER >= 14
127-
12869_LIBCPP_END_NAMESPACE_STD
12970
13071_LIBCPP_POP_MACROS
0 commit comments