[libcxx-commits] [libcxx] [libc++] Avoid materializing input ranges prepended to deque (PR #199969)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 27 08:00:28 PDT 2026


================
@@ -1231,6 +1235,15 @@ private:
   template <class _Iterator, class _Sentinel>
   _LIBCPP_HIDE_FROM_ABI iterator __insert_with_sentinel(const_iterator __p, _Iterator __f, _Sentinel __l);
 
+#  ifndef _LIBCPP_CXX03_LANG
----------------
BITree2004 wrote:

Thanks for catching this. I was too conservative with the C++03 guard

C++03 doesn’t have the C++23 range APIs, but the iterator-pair insert overload is affected by the same split_buffer materialization. I will make the new path available there as well, using push_front instead of emplace_front in C++03 mode. I will keep the frozen C++03 headers unchanged

https://github.com/llvm/llvm-project/pull/199969


More information about the libcxx-commits mailing list