[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:24 PDT 2025
================
@@ -44,22 +44,9 @@ void __basic_string_common<true>::__throw_out_of_range() const { std::__throw_ou
template <class _CharT, class _Traits, class _Allocator>
void basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz, size_type __reserve) {
----------------
ldionne wrote:
As a drive-by, let's add a comment explaining what this function does (initialize the string while reserving additional capacity).
https://github.com/llvm/llvm-project/pull/128423
More information about the libcxx-commits
mailing list