Louis Dionne
b8cb1dc9ea
[libc++] Make <ranges> non-experimental
...
When we ship LLVM 16, <ranges> won't be considered experimental anymore.
We might as well do this sooner rather than later.
Differential Revision: https://reviews.llvm.org/D132151
2022-08-18 16:59:58 -04:00
Nikolas Klauser
7ae66e5e95
[libc++] Granularize the rest of type_traits
...
Reviewed By: ldionne, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D130471
2022-08-14 10:30:48 +02:00
Konstantin Varlamov
8ac015caf6
[libc++][ranges][NFC] Make sure all implemented algorithms are enabled in "robust" tests.
...
Also fix `std::find_first_of` (which accidentally copied the predicate
in the implementation).
Differential Revision: https://reviews.llvm.org/D131235
2022-08-05 14:02:12 -07:00
Konstantin Varlamov
36c746ca2d
[libc++][ranges] Implement `ranges::rotate`.
...
Also fix `ranges::stable_sort` and `ranges::inplace_merge` to support
proxy iterators now that their internal implementations can correctly
dispatch `rotate`.
Differential Revision: https://reviews.llvm.org/D130758
2022-08-03 16:04:24 -07:00
Nikolas Klauser
93172c1c2b
[libc++][ranges] Implement `ranges::replace_copy{,_if}`.
...
Co-authored-by: Konstantin Varlamov <varconst@apple.com>
Differential Revision: https://reviews.llvm.org/D129806
2022-08-02 22:32:01 -07:00
Konstantin Varlamov
f537a01d39
[libc++][ranges] Fix the return value of `{copy,move}_backward`.
...
The return value for both of these algorithms is specified as
```
`{last, result - N}` for the overloads in namespace `ranges`.
```
But the current implementation instead returns `{first, result - N}`.
Also add both algorithms to the relevant "robust" tests.
Differential Revision: https://reviews.llvm.org/D130968
2022-08-02 22:22:59 -07:00
Nikolas Klauser
760d2b462c
[libc++][ranges] Implement `ranges::remove_copy{, _if}`.
...
Co-authored-by: Hui Xie <hui.xie1990@gmail.com>
Differential Revision: https://reviews.llvm.org/D130599
2022-08-02 22:19:13 -07:00
Konstantin Varlamov
db7d795978
[libc++][ranges] Implement `std::ranges::partial_sort_copy`.
...
Differential Revision: https://reviews.llvm.org/D130532
2022-07-30 02:42:18 -07:00
Hui Xie
72f57e3a30
[libc++][ranges] implement `std::ranges::unique{_copy}`
...
implement `std::ranges::unique` and `std::ranges::unique_copy`
Differential Revision: https://reviews.llvm.org/D130404
2022-07-29 08:28:17 +01:00
Hui Xie
8a61749f76
[libc++][ranges] implement `std::ranges::inplace_merge`
...
Differential Revision: https://reviews.llvm.org/D130627
2022-07-28 08:37:48 +01:00
Konstantin Varlamov
d406c6493e
[libc++][ranges] Implement `ranges::is_heap{,_until}`.
...
Differential Revision: https://reviews.llvm.org/D130547
2022-07-26 16:11:24 -07:00
Konstantin Varlamov
ead7302bbb
[libc++][ranges] Implement `ranges::generate{,_n}`.
...
Differential Revision: https://reviews.llvm.org/D130552
2022-07-26 15:50:32 -07:00
Konstantin Varlamov
14cf74d65d
[libc++][ranges] Implement `ranges::shuffle`.
...
Differential Revision: https://reviews.llvm.org/D130321
2022-07-22 09:59:13 -07:00
Konstantin Varlamov
065202f3ca
[libc++][ranges] Implement `std::ranges::partition_{point,copy}`.
...
Reviewed By: #libc, huixie90, ldionne
Differential Revision: https://reviews.llvm.org/D130070
2022-07-20 11:39:07 -07:00
Konstantin Varlamov
25aa29f38a
[libc++][ranges][NFC] Consolidate range algorithm checks for returning `dangling`.
...
Also simplify the `robust` test files for non-boolean predicates and
omitting `std::invoke`.
Differential Revision: https://reviews.llvm.org/D129741
2022-07-19 20:46:22 -07:00