Konstantin Varlamov
ff3989e6ae
[libc++][ranges] Implement `ranges::sort`.
...
Differential Revision: https://reviews.llvm.org/D127557
2022-06-16 15:21:06 -07:00
Nikolas Klauser
afd5a4f2dc
[libc++] Implement ranges::lexicographical_compare
...
Reviewed By: var-const, Mordante, #libc
Spies: H-G-Hristov, sstefan1, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D127130
2022-06-15 22:29:21 +02:00
Nikolas Klauser
ff6d5dee71
[libc++] Implement ranges::replace{, _if}
...
Reviewed By: var-const, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D126283
2022-06-10 11:54:46 +02:00
Nikolas Klauser
916e9052ba
[libc++] Implement ranges::adjacent_find
...
Reviewed By: Mordante, var-const, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D126610
2022-06-08 12:15:03 +02:00
Nikolas Klauser
8171586176
[libc++][ranges] Implement ranges::binary_search and ranges::{lower, upper}_bound
...
Reviewed By: Mordante, var-const, ldionne, #libc
Spies: sstefan1, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D121964
2022-06-06 13:33:18 +02:00
Nikolas Klauser
3606da5fba
[libc++] Enable ranges_robust_against* and niebloid tests for implemented ranges algorithms
...
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D126477
2022-05-27 10:40:01 +02:00
Nikolas Klauser
11e3ad299f
[libc++] Implement ranges::is_sorted{, _until}
...
Reviewed By: Mordante, var-const, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D125608
2022-05-27 10:28:44 +02:00
Nikolas Klauser
0e3dc1a52f
[libc++] Implement ranges::{all, any, none}_of
...
Reviewed By: ldionne, var-const, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D123016
2022-05-26 16:50:08 +02:00
Nikolas Klauser
1d1a191edc
[libc++] Implement ranges::reverse
...
Reviewed By: var-const, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D125752
2022-05-24 10:33:57 +02:00
Nikolas Klauser
58d9ab70ae
[libc++][ranges] Implement ranges::minmax and ranges::minmax_element
...
Reviewed By: var-const, #libc, ldionne
Spies: sstefan1, ldionne, BRevzin, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D120637
2022-04-14 15:37:22 +02:00
Nikolas Klauser
1306b1025c
[libc++][ranges] Implement ranges::count{, _if}
...
Reviewed By: var-const, Mordante, ldionne, #libc
Spies: tcanens, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D121523
2022-04-07 15:18:14 +02:00
Nikolas Klauser
f83d833e41
[libc++][ranges] Implement ranges::min
...
Reviewed By: var-const, Mordante, #libc
Spies: jwakely, ldionne, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D119589
2022-03-18 12:52:21 +01:00
Joe Loser
d2baefae68
[libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI.
...
All supported compilers that support C++20 now support concepts. So, remove
`_LIB_LIBCPP_HAS_NO_CONCEPTS` in favor of `_LIBCPP_STD_VER > 17`. Similarly in
the tests, remove `// UNSUPPORTED: libcpp-no-concepts`.
Differential Revision: https://reviews.llvm.org/D121528
2022-03-13 12:32:06 -04:00
Nikolas Klauser
ee0f8c4010
[libc++][ranges] Implement ranges::find{, _if, _if_not}
...
Reviewed By: var-const, #libc, ldionne
Spies: ldionne, tcanens, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D121248
2022-03-12 01:46:02 +01:00
Nikolas Klauser
c2cd15a665
[libc++][ranges] Implement ranges::mismatch
...
Implement `ranges::mismatch`
Reviewed By: Quuxplusone, ldionne, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D117817
2022-03-08 23:20:40 +01:00
Nikolas Klauser
205557c908
[libc++][ranges] Implement ranges::max_element
...
Implement ranges::max_element
Reviewed By: Quuxplusone, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D117523
2022-03-07 17:11:23 +01:00
Arthur O'Dwyer
db33373596
[libc++] [test] Split "UNSUPPORTED: libcpp-no-concepts, libcpp-has-no-incomplete-ranges" onto two lines. NFC.
2022-02-15 10:38:21 -05:00
Arthur O'Dwyer
6c4052166c
[libc++] [test] Uncomment std::ranges::min_element in niebloid.compile.pass.cpp.
...
This should have been part of 3b470d1ce .
2022-02-14 15:12:10 -05:00
Nikolas Klauser
9d90531904
[libc++][ranges] Implement std::ranges::swap_ranges()
...
Implement `std::ranges::swap_ranges()`
Reviewed By: Quuxplusone, #libc, ldionne
Spies: ldionne, mgorny, jloser, libcxx-commits
Differential Revision: https://reviews.llvm.org/D116303
2022-02-10 16:01:45 +01:00
Arthur O'Dwyer
c965d5448e
[libc++] [ranges] Implement std::ranges::distance
...
This includes an experimental workaround for
LWG3664 "LWG3392 broke std::ranges::distance(a, a+3)",
but the workaround may be incomplete, I'm not sure.
This should be re-audited when LWG3664 is actually adopted,
to see if we need to change anything about our implementation.
See also https://github.com/microsoft/STL/pull/2500
Differential Revision: https://reviews.llvm.org/D117940
2022-01-31 12:23:10 -05:00
Arthur O'Dwyer
26fffc1b8e
[libc++] [test] {cpo,niebloid}.compile.pass.cpp: Also test their constness.
...
This will detect if someone writes `inline auto cpo =` instead of
`inline constexpr auto cpo =`. I don't know how that'd be possible,
but it's easy to test, so let's test it.
2022-01-22 11:53:00 -05:00
Arthur O'Dwyer
63a991d035
[libc++] Eliminate the `__function_like` helper.
...
As prefigured in the comments on D115315.
This gives us one unified style for all niebloids,
and also simplifies the modulemap.
Differential Revision: https://reviews.llvm.org/D116570
2022-01-20 14:40:16 -05:00