[libcxx-commits] [libcxx] [lldb] [libcxx] adds size-based `__split_buffer` representation to unstable ABI (PR #139632)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 7 03:03:48 PDT 2025
================
@@ -45,11 +47,232 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
+template <class _SplitBuffer>
+class __split_buffer_pointer_layout {
+public: // TODO: make private after vector becomes size-based
+ using reference = typename _SplitBuffer::reference;
+ using const_reference = typename _SplitBuffer::const_reference;
+ using pointer = typename _SplitBuffer::pointer;
+ using const_pointer = typename _SplitBuffer::const_pointer;
+ using size_type = typename _SplitBuffer::size_type;
+ using allocator_type = typename _SplitBuffer::allocator_type;
+
+ pointer __first_ = nullptr;
+ pointer __begin_ = nullptr;
+ pointer __end_ = nullptr;
+ _LIBCPP_COMPRESSED_PAIR(pointer, __cap_ = nullptr, allocator_type, __alloc_);
+
+public:
+ static const bool __is_size_based = false;
----------------
philnik777 wrote:
This is a bit smelly. Why do we need to inform `__split_buffer` which memory layout it is using?
https://github.com/llvm/llvm-project/pull/139632
More information about the libcxx-commits
mailing list