[libcxx-commits] [libcxx] [libc++] `std::ranges::advance`: avoid unneeded bounds checks when advancing iterator (PR #84126)
Jan Kokemüller via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 29 03:00:11 PDT 2024
================
@@ -213,6 +221,20 @@ constexpr bool test() {
assert(i == iota_iterator{INT_MIN+1});
}
+ // Check that we don't do an unneeded bounds check when decrementing a
----------------
jiixyj wrote:
OK, I've removed that misleading comment for the `check_backward` tests and adapted them to take bidirectional iterators. Then, I could also remove my "special case" test I had added, since the `check_backward` tests now cover the "decrement one by one" case as well.
https://github.com/llvm/llvm-project/pull/84126
More information about the libcxx-commits
mailing list