You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#78929 had to round the bounds on std::vector up from size() to capacity() because the standard promises more permissive iterator invalidation. This had the side effect of making the checks harder to optimize.
I think this will require both STL and compiler improvements to fix. There are a couple type-level invariants that the compiler needs to be informed of. Those we can add with _LIBCPP_ASSUME after #91801 lands.
I'll file a separate bug for that one. One that is fixed and #91801 lands, I can add the missing assumptions to libc++. (Happy to add them now, but since we're missing a compiler check, it'd be speculative without the compiler half.)