@@ -351,11 +351,6 @@ _Ty* _Unique_copy_vectorized(const _Ty* const _First, const _Ty* const _Last, _T
351
351
_STL_INTERNAL_STATIC_ASSERT(false); // Unexpected size
352
352
}
353
353
}
354
-
355
- // Can we activate the vector algorithms for find_first_of?
356
- template <class _It1, class _It2, class _Pr>
357
- constexpr bool _Vector_alg_in_find_first_of_is_safe = _Equal_memcmp_is_safe<_It1, _It2, _Pr>;
358
-
359
354
// Can we activate the vector algorithms for replace?
360
355
template <class _Iter, class _Ty1>
361
356
constexpr bool _Vector_alg_in_replace_is_safe = _Vector_alg_in_find_is_safe<_Iter, _Ty1> // can search for the value
@@ -376,7 +371,7 @@ constexpr bool _Vector_alg_in_search_n_is_safe = _Vector_alg_in_find_is_safe<_It
376
371
equal_to<>>;
377
372
// Can we activate the vector algorithms for unique?
378
373
template <class _Iter, class _Pr>
379
- constexpr bool _Vector_alg_in_unique_is_safe = _Equal_memcmp_is_safe <_Iter, _Iter, _Pr>;
374
+ constexpr bool _Vector_alg_in_unique_is_safe = _Vector_alg_in_search_is_safe <_Iter, _Iter, _Pr>;
380
375
381
376
// Can we use this output iterator for remove_copy or unique_copy?
382
377
template <class _Out, class _In>
@@ -712,7 +707,7 @@ _NODISCARD _CONSTEXPR20 _FwdIt adjacent_find(const _FwdIt _First, _FwdIt _Last,
712
707
auto _ULast = _STD _Get_unwrapped(_Last);
713
708
if (_UFirst != _ULast) {
714
709
#if _USE_STD_VECTOR_ALGORITHMS
715
- if constexpr (_Equal_memcmp_is_safe <decltype(_UFirst), decltype(_UFirst), _Pr>) {
710
+ if constexpr (_Vector_alg_in_search_is_safe <decltype(_UFirst), decltype(_UFirst), _Pr>) {
716
711
if (!_STD _Is_constant_evaluated()) {
717
712
const auto _First_ptr = _STD _To_address(_UFirst);
718
713
const auto _Result = _STD _Adjacent_find_vectorized(_First_ptr, _STD _To_address(_ULast));
@@ -888,7 +883,7 @@ _NODISCARD _CONSTEXPR20 pair<_InIt1, _InIt2> mismatch(_InIt1 _First1, const _InI
888
883
const auto _ULast1 = _STD _Get_unwrapped(_Last1);
889
884
auto _UFirst2 = _STD _Get_unwrapped_n(_First2, _STD _Idl_distance<_InIt1>(_UFirst1, _ULast1));
890
885
#if _USE_STD_VECTOR_ALGORITHMS
891
- if constexpr (_Equal_memcmp_is_safe <decltype(_UFirst1), decltype(_UFirst2), _Pr>) {
886
+ if constexpr (_Vector_alg_in_search_is_safe <decltype(_UFirst1), decltype(_UFirst2), _Pr>) {
892
887
if (!_STD _Is_constant_evaluated()) {
893
888
constexpr size_t _Elem_size = sizeof(_Iter_value_t<_InIt1>);
894
889
@@ -952,7 +947,7 @@ _NODISCARD _CONSTEXPR20 pair<_InIt1, _InIt2> mismatch(
952
947
const auto _Count = static_cast<_Iter_diff_t<_InIt1>>((_STD min)(_Count1, _Count2));
953
948
_ULast1 = _UFirst1 + _Count;
954
949
#if _USE_STD_VECTOR_ALGORITHMS
955
- if constexpr (_Equal_memcmp_is_safe <decltype(_UFirst1), decltype(_UFirst2), _Pr>) {
950
+ if constexpr (_Vector_alg_in_search_is_safe <decltype(_UFirst1), decltype(_UFirst2), _Pr>) {
956
951
if (!_STD _Is_constant_evaluated()) {
957
952
constexpr size_t _Elem_size = sizeof(_Iter_value_t<_InIt1>);
958
953
@@ -3796,7 +3791,7 @@ _NODISCARD _CONSTEXPR20 _FwdIt1 find_first_of(
3796
3791
}
3797
3792
3798
3793
#if _USE_STD_VECTOR_ALGORITHMS
3799
- if constexpr (_Vector_alg_in_find_first_of_is_safe <decltype(_UFirst1), decltype(_UFirst2), _Pr>) {
3794
+ if constexpr (_Vector_alg_in_search_is_safe <decltype(_UFirst1), decltype(_UFirst2), _Pr>) {
3800
3795
if (!_STD _Is_constant_evaluated() && _ULast1 - _UFirst1 >= _Threshold_find_first_of) {
3801
3796
const auto _First1_ptr = _STD _To_address(_UFirst1);
3802
3797
const auto _Result = _STD _Find_first_of_vectorized(
@@ -3900,7 +3895,7 @@ namespace ranges {
3900
3895
}
3901
3896
3902
3897
#if _USE_STD_VECTOR_ALGORITHMS
3903
- if constexpr (_Vector_alg_in_find_first_of_is_safe <_It1, _It2, _Pr> && sized_sentinel_for<_Se1, _It1>
3898
+ if constexpr (_Vector_alg_in_search_is_safe <_It1, _It2, _Pr> && sized_sentinel_for<_Se1, _It1>
3904
3899
&& sized_sentinel_for<_Se2, _It2> && is_same_v<_Pj1, identity> && is_same_v<_Pj2, identity>) {
3905
3900
if (!_STD is_constant_evaluated() && _Last1 - _First1 >= _Threshold_find_first_of) {
3906
3901
const auto _Count1 = static_cast<ptrdiff_t>(_Last1 - _First1);
0 commit comments