[libcxx-commits] [libcxx] [libc++] Replace __resize_default_init with resize_and_overwrite (PR #157121)

James Y Knight via libcxx-commits libcxx-commits at lists.llvm.org
Sun Sep 21 12:46:53 PDT 2025


jyknight wrote:

> Where did you get that information from? I can't find anything in the git history or our documentation suggesting that is was intended as an extension.

Extremely vague recollections of discussions when it was added in 2018, combined with it being public. 

> I don't think the mere fact that it was public can be argumentation here [...]

Point taken. Let's just say that I _thought_ it was intentionally public...but you're making me doubt my conviction.

> FWIW I also don't see much of a reason not to carry an internal patch (e.g. making resize_and_overwrite available for the language modes you care about).

This is what I'm currently pursuing.

It's not _ideal_ to not have this available upstream, since it means the performance properties running on an unpatched libc++ may be drastically worse, and sometimes we build code against standard libc++. It's _probably_ fine to miss this optimization in those cases, but my ideal situation would be to have a supported solution that works even with unpatched libc++ upstream.

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


More information about the libcxx-commits mailing list