[libcxx-commits] [libcxx] [libc++] Replace __resize_default_init with resize_and_overwrite (PR #157121)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 20 01:27:21 PDT 2025
philnik777 wrote:
> `__resize_default_init` was a tested, nonstandard public API (that is, intentionally in the "public:" access section) on libc++'s std::string -- so, I'd say, not really dead code even if the internal implementation no longer needs to call it.
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.
I don't think the mere fact that it was `public` can be argumentation here, since we have some other functions which are clearly internal (`__move_assign` and `__invariants` AFAICT) but `public` as well as any free functions starting with `__`.
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). That seems to me much lower risk than using internal functions we could rename or entirely remove at any point.
https://github.com/llvm/llvm-project/pull/157121
More information about the libcxx-commits
mailing list