[libcxx-commits] [libcxx] [libc++] Add some _LIBCPP_ASSUMEs for bounded iterators (PR #109033)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 27 08:59:43 PDT 2025
================
@@ -101,10 +101,26 @@ struct __bounded_iter {
_LIBCPP_HIDE_FROM_ABI
_LIBCPP_CONSTEXPR_SINCE_CXX14 explicit __bounded_iter(_Iterator __current, _Iterator __begin, _Iterator __end)
: __current_(__current), __begin_(__begin), __end_(__end) {
+ // These are internal checks rather than hardening checks because the STL container is expected to ensure they are
+ // in order.
----------------
ldionne wrote:
I think this comment is unnecessary, the purpose of internal assertions is always to check something that our implementation is expected to always satisfy.
```suggestion
```
https://github.com/llvm/llvm-project/pull/109033
More information about the libcxx-commits
mailing list