[libcxx-commits] [libcxx] [libc++] Speed-up {random_access, forward}_range-based operations in vector<bool>[3/3] (PR #120134)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 19 09:12:49 PDT 2025
================
@@ -95,6 +117,64 @@ struct __copy_impl {
}
}
+ template <class _InIter,
+ class _Sent,
+ class _Cp,
+ __enable_if_t<(__has_forward_iterator_category<_InIter>::value ||
+ __has_iterator_concept_convertible_to<_InIter, forward_iterator_tag>::value) &&
+ is_convertible<typename iterator_traits<_InIter>::value_type, bool>::value,
+ int> = 0>
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, __bit_iterator<_Cp, false> >
+ operator()(_InIter __first, _Sent __last, __bit_iterator<_Cp, false> __result) const {
----------------
ldionne wrote:
```suggestion
operator()(_InIter __first, _Sent __last, __bit_iterator<_Cp, /* IsConst */false> __result) const {
```
https://github.com/llvm/llvm-project/pull/120134
More information about the libcxx-commits
mailing list