[libcxx-commits] [libcxx] dea4386 - [libc++][NFC] Add a short description for __split_buffer
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 18 07:16:24 PDT 2022
Author: Nikolas Klauser
Date: 2022-08-18T16:16:20+02:00
New Revision: dea43867495484dcbacdf51c96e966b994f69d1e
URL: https://github.com/llvm/llvm-project/commit/dea43867495484dcbacdf51c96e966b994f69d1e
DIFF: https://github.com/llvm/llvm-project/commit/dea43867495484dcbacdf51c96e966b994f69d1e.diff
LOG: [libc++][NFC] Add a short description for __split_buffer
Reviewed By: Mordante, huixie90, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D132032
Added:
Modified:
libcxx/include/__split_buffer
Removed:
################################################################################
diff --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index 4d40732a75cf0..5db09638671fa 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -34,6 +34,10 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
+// __split_buffer allocates a contiguous chunk of memory and stores objects in the range [__begin_, __end_).
+// It has uninitialized memory in the ranges [__first_, __begin_) and [__end_, __end_cap_.first()). That allows
+// it to grow both in the front and back without having to move the data.
+
template <class _Tp, class _Allocator = allocator<_Tp> >
struct __split_buffer
{
More information about the libcxx-commits
mailing list