[libcxx-commits] [libcxx] [libcxx] adds a size-based representation for `vector`'s unstable ABI (PR #155330)
Christopher Di Bella via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 23 00:35:43 PDT 2026
================
@@ -188,6 +189,57 @@ public:
__back_cap_ = __other.__back_cap_;
}
+ _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void
+ __swap_layouts(pointer& __begin, pointer& __end, pointer& __back_capacity) {
+ std::swap(__begin_, __begin);
+ std::swap(__end_, __end);
+ std::swap(__back_cap_, __back_capacity);
+ }
+
+ /// `__relocate` relocates the objects in `[__begin_, __size())` into the front of `__buffer` and
----------------
cjdb wrote:
I cut/pasted [this comment](https://github.com/llvm/llvm-project/blob/main/libcxx/include/__vector/vector.h#L857-L859), but forgot to edit it for its new home. Should hopefully read sensibly now.
https://github.com/llvm/llvm-project/pull/155330
More information about the libcxx-commits
mailing list