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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 26 08:33:27 PDT 2025


================
@@ -2144,6 +2119,58 @@ private:
     return __is_long() ? __get_long_pointer() : __get_short_pointer();
   }
 
+  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX20 __alloc_result
----------------
ldionne wrote:

For each of these functions, let's add a short documentation comment explaining what it does and what its assumptions are. Let's not make the same mistake that led us to the `<string>` we have today.

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


More information about the libcxx-commits mailing list