[libcxx-commits] [libcxx] [libc++] Refactor how we do amortized growth (PR #171117)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 26 09:11:49 PST 2026


================
@@ -2285,6 +2285,25 @@ private:
     return __long(__buffer, __capacity);
   }
 
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __long
+  __allocate_long_buffer_for_amortized_growth(size_type __required_size) {
----------------
ldionne wrote:

It has the objective benefit that we're now able to also fix the call in `reserve`.

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


More information about the libcxx-commits mailing list