[libcxx-commits] [libcxx] [libc++] Refactor memory allocation in basic_string (PR #128423)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 10 09:33:25 PDT 2025


================
@@ -2250,6 +2229,73 @@ private:
     return __is_long() ? __get_long_pointer() : __get_short_pointer();
   }
 
+  // Internal buffer management
----------------
ldionne wrote:

```suggestion
  // Internal buffer management
  //
  // These functions are only responsible for managing the buffer itself,
  // but not the value inside the buffer. As such, none of these facilities
  // insert a null terminator.
```

https://github.com/llvm/llvm-project/pull/128423


More information about the libcxx-commits mailing list