[libcxx-commits] [libcxx] [libc++] Introduce _LIBCPP_ABI_BOUNDED_ITERATORS_IN_{STRING_VIEW, SPAN} (PR #143172)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 18 23:53:59 PDT 2025


philnik777 wrote:

> > I think I'd rather go the other direction, i.e. merge all of the macros into a single one. I don't see why anybody would enable only some of the utilities in this list while ignoring others. Or is there any known configuration that is already ABI stable that doesn't follow this practice?
> 
> The issue with merging all of these ABI macros into one is that we can't start hardening new iterators without making it an ABI break. It's also easier to roll out these changes one by one since these iterators can trigger new runtime failures.
> 
> One thing we could do is actually keep the umbrella macro and document it as enabling all of the hardening, but I don't really see a downside in having the per-container macros.

The main downside I see is that it makes it a lot easier to have a very weird ABI configuration. I understand that there can be some roll-out challenges, but at this point I think it would be better to allow opting out of specific additions for a set period of time rather than having to opt in to every single one individually.

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


More information about the libcxx-commits mailing list