[libcxx-commits] [libcxx] [libc++] Fix insertion into `deque` from prvalue ranges (PR #160022)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 22 00:32:29 PDT 2025
================
@@ -1916,6 +1917,12 @@ template <class _Tp, class _Allocator>
template <class _BiIter>
_LIBCPP_HIDE_FROM_ABI typename deque<_Tp, _Allocator>::iterator
deque<_Tp, _Allocator>::__insert_bidirectional(const_iterator __p, _BiIter __f, _BiIter __l, size_type __n) {
+# if _LIBCPP_STD_VER >= 20
+ using _Ops = _IterOps<
+ conditional_t<__has_bidirectional_iterator_category<_BiIter>::value, _ClassicAlgPolicy, _RangeAlgPolicy>>;
+# else
+ using _Ops = _IterOps<_ClassicAlgPolicy>;
+# endif
----------------
frederick-vs-ja wrote:
Changed. Thanks!
https://github.com/llvm/llvm-project/pull/160022
More information about the libcxx-commits
mailing list