forked from OSchip/llvm-project
d27cbfa9d3
In `ranges::advance(iter, n, bound)`, we'd incorrectly handle the case where bound < iter and n is 0: int a[10]; int *p = a+5; int *bound = a+3; std::ranges::advance(p, 0, bound); assert(p - a == 5); // we'd return 3 before this patch This was caused by an incorrect handling of 0 inside __magnitude_geq. Differential Revision: https://reviews.llvm.org/D117240 |
||
---|---|---|
.. | ||
iterator.container | ||
iterator.primitives | ||
iterator.range | ||
iterator.requirements | ||
iterator.synopsis | ||
iterators.general | ||
predef.iterators | ||
stream.iterators |