[libcxx-commits] [PATCH] D132032: [libc++][NFC] Add a short description for __split_buffer

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 17 08:01:29 PDT 2022


philnik created this revision.
philnik added reviewers: ldionne, Mordante, var-const, huixie90.
Herald added a project: All.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132032

Files:
  libcxx/include/__split_buffer


Index: libcxx/include/__split_buffer
===================================================================
--- libcxx/include/__split_buffer
+++ libcxx/include/__split_buffer
@@ -34,6 +34,10 @@
 
 _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
 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132032.453288.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220817/84ced695/attachment-0001.bin>


More information about the libcxx-commits mailing list