[libcxx-commits] [libcxx] [libc++] Optimize ranges::equal for vector<bool>::iterator (PR #121084)
Peng Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 20 13:14:39 PST 2025
================
@@ -787,15 +671,36 @@ private:
template <class _Dp>
_LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false>
rotate(__bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>);
- template <class _Dp, bool _IC1, bool _IC2>
- _LIBCPP_CONSTEXPR_SINCE_CXX20 friend bool
- __equal_aligned(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>);
- template <class _Dp, bool _IC1, bool _IC2>
+ template <class _Dp, bool _IsConst1, bool _IsConst2>
----------------
winner245 wrote:
Great suggestion! Using the suggested iterator core access pattern will clean up all those ugly friend declarations in `__bit_iterator`. I’ll tackle this refactoring once this series is done.
https://github.com/llvm/llvm-project/pull/121084
More information about the libcxx-commits
mailing list