[libcxx-commits] [libcxx] [libc++] Refactor memory allocation in basic_string (PR #128423)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 14 08:05:24 PDT 2025
================
@@ -2144,6 +2119,58 @@ private:
return __is_long() ? __get_long_pointer() : __get_short_pointer();
}
----------------
ldionne wrote:
Perhaps adding commented sections like
```
//////////////////////////////////////////////////////////////
// Internal buffer management
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
// Internal representation
//////////////////////////////////////////////////////////////
```
would help organize things a bit here without requiring full blown encapsulation in a class.
https://github.com/llvm/llvm-project/pull/128423
More information about the libcxx-commits
mailing list