summaryrefslogtreecommitdiff
path: root/libc/test/src/__support/CPP/array_test.cpp
AgeCommit message (Collapse)Author
2024-03-19[libc][cpp] reverse_iterator support (#85702)Nick Desaulniers
Towards the goal of implementing __cxa_finalize (#85651) I'd like to be able to reverse iterate over cpp::arrays such as the one used in FixedVector. Implement the enough iterator support to be able to iterate a cpp::array in reverse, and add tests. Of note, reverse iterator's begin() refers to forward iterator's end() (and vice versa). When dereferenced (operator*), the reverse iterator returns a copy that's been pre-decremented (the underlying forward iterator is advanced).