================
@@ -820,6 +820,26 @@ class vector {
   __add_alignment_assumption(_Ptr __p) _NOEXCEPT {
     return __p;
   }
+
+  template <template <class, class, class> class _Layout>
+  _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+  __swap_layouts(__split_buffer<_Tp, allocator_type&, _Layout>& __v) {
+    auto __begin    = __begin_;
+    auto __sentinel = __end_;
+    auto __cap      = __cap_;
+
+    auto __v_begin    = __v.begin();
+    auto __v_sentinel = __v.__sentinel();
+    auto __v_cap      = __v.__raw_capacity();
+
+    // TODO: replace with __set_valid_range and __set_capacity when vector 
supports it.
+    __begin_ = __v_begin;
+    __end_   = __v_sentinel;
----------------
ldionne wrote:

This doesn't work in the case of a size-based `split_buffer`, right? Since the 
sentinel of the split buffer is an integer and the vector's `__end_` is a 
pointer.

https://github.com/llvm/llvm-project/pull/139632
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to