[libcxx-commits] [libcxx] [libcxx] adds a size-based representation for `vector`'s unstable ABI (PR #155330)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 3 09:54:05 PDT 2026
================
@@ -760,10 +777,10 @@ class vector {
};
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __base_destruct_at_end(pointer __new_last) _NOEXCEPT {
- pointer __soon_to_be_end = this->__end_;
+ pointer __soon_to_be_end = __layout_.__end_ptr();
while (__new_last != __soon_to_be_end)
- __alloc_traits::destroy(this->__alloc_, std::__to_address(--__soon_to_be_end));
- this->__end_ = __new_last;
+ __alloc_traits::destroy(this->__layout_.__alloc(), std::__to_address(--__soon_to_be_end));
+ __layout_.__set_boundary(__new_last);
----------------
ldionne wrote:
```suggestion
__layout_.__set_end(__new_last);
```
https://github.com/llvm/llvm-project/pull/155330
More information about the libcxx-commits
mailing list