llvm-project/libcxx/test/std/iterators/iterator.primitives
Louis Dionne d27cbfa9d3 [libc++] Fix bug in ranges::advance
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
2022-01-27 10:57:54 -05:00
..
iterator.basic [libc++] Deprecate std::iterator and remove it as a base class 2021-05-27 11:34:04 -04:00
iterator.operations [libc++] Avoid triggering warnings for implicit conversion 2021-07-23 10:53:10 -04:00
iterator.traits [libc++] Fix backdeployment annotations for std::filesystem 2021-11-24 16:58:15 -05:00
range.iter.ops [libc++] Fix bug in ranges::advance 2022-01-27 10:57:54 -05:00
std.iterator.tags [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00