[libc++] Always enable the ranges conceptsThe ranges concepts were already available in libc++13, so we shouldn't guard them with `_LIBCPP_HAS_NO_INCOMPLETE_RANGES`.Fixes https://github.com/llvm/l
[libc++] Always enable the ranges conceptsThe ranges concepts were already available in libc++13, so we shouldn't guard them with `_LIBCPP_HAS_NO_INCOMPLETE_RANGES`.Fixes https://github.com/llvm/llvm-project/issues/54765Reviewed By: #libc, ldionneSpies: ldionne, libcxx-commitsDifferential Revision: https://reviews.llvm.org/D124011
show more ...
[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 `_LIBC
[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 inthe tests, remove `// UNSUPPORTED: libcpp-no-concepts`.Differential Revision: https://reviews.llvm.org/D121528
[libc++][NFC] Use cpp17_output_iterator in tests.The renames the output_iterator to cpp17_output_iterator. Theseiterators are still used in C++20 so it's not possible to change thecurrent type to
[libc++][NFC] Use cpp17_output_iterator in tests.The renames the output_iterator to cpp17_output_iterator. Theseiterators are still used in C++20 so it's not possible to change thecurrent type to the new C++20 requirements. This is done in a similarfashion as the cpp17_input_iterator.Reviewed By: #libc, Quuxplusone, ldionneDifferential Revision: https://reviews.llvm.org/D117950
[libc++] [ranges] ADL-proof ranges::iter_{swap,move}.As discovered in D117817, `std::ranges::input_range<Holder<Incomplete>*[10]>`hard-errored before this patch. That's because `input_range` requi
[libc++] [ranges] ADL-proof ranges::iter_{swap,move}.As discovered in D117817, `std::ranges::input_range<Holder<Incomplete>*[10]>`hard-errored before this patch. That's because `input_range` requires`iter_rvalue_reference_t`, which requires `iter_move`, which wasnot ADL-proofed.Add ADL-proofing tests to all the range refinements.`output_range` and `common_range` shouldn't be affected,and all the others subsume `input_range` anyway, but we might aswell be thorough.Differential Revision: https://reviews.llvm.org/D118213
[libc++] [ranges] Implement P2415R2 owning_view."What is a view?"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2415r2.htmlhttps://github.com/cplusplus/draft/pull/5010/filesThis was a
[libc++] [ranges] Implement P2415R2 owning_view."What is a view?"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2415r2.htmlhttps://github.com/cplusplus/draft/pull/5010/filesThis was a late-breaking (Oct 2021) change to C++20.The only thing missing from this patch is that we're supposedto bump the feature-test macro from #define __cpp_lib_ranges 202106Lto #define __cpp_lib_ranges 202110Lbut we can't do that because we don't implement all of 202106 Ranges yet.Differential Revision: https://reviews.llvm.org/D116894
[libc++] [ranges] Fix a missing auto(x) cast in ranges::data.Also remove some bogus `std::forward`s. My impression is that theseforwards were actually harmless, because `ranges::begin(FWD(t))` is
[libc++] [ranges] Fix a missing auto(x) cast in ranges::data.Also remove some bogus `std::forward`s. My impression is that theseforwards were actually harmless, because `ranges::begin(FWD(t))` isalways identical to `ranges::begin(t)` (except when it's ill-formed,and that can't happen in this case). However, they're also superfluousand don't reflect the wording in the standard, so let's eliminate them.Differential Revision: https://reviews.llvm.org/D117043
[libc++] Remove incorrect default constructor in cpp17_input_iteratorAFAICT, Cpp17InputIterators are not required to be default constructible,since that requirement is added in Cpp17ForwardIterato
[libc++] Remove incorrect default constructor in cpp17_input_iteratorAFAICT, Cpp17InputIterators are not required to be default constructible,since that requirement is added in Cpp17ForwardIterator. Hence, ourarchetype for Cpp17InputIterator should not be default constructible.Removing that constructor has a ripple effect on a couple of tests thatwere making incorrect assumptions. Notably:- Some tests were using cpp17_input_iterator as a sentinel for itself. That is not valid, because a cpp17_input_iterator is not semiregular anymore after the change (and hence it doesn't satisfy sentinel_for).- Some tests were using a stride-counted cpp17_input_iterator as the sentinel for a range. This doesn't work anymore because of the problem above, so these tests were changed not to check stride counts for input iterators.- Some tests were default constructing cpp17_input_iterator when a simple alternative was available -- those have been changed to use that alternative.Differential Revision: https://reviews.llvm.org/D115806
[libc++][NFC] Replace uses of stdr:: by just std::ranges::Differential Revision: https://reviews.llvm.org/D109121
[libc++] Remove Lit annotations for unsupported GCC versions from the test suiteSince we officially don't support several older compilers now, we candrop a lot of the markup in the test suite. Thi
[libc++] Remove Lit annotations for unsupported GCC versions from the test suiteSince we officially don't support several older compilers now, we candrop a lot of the markup in the test suite. This helps keep the testsuite simple and makes sure that UNSUPPORTED annotations don't rot.This is the first patch of a series that will remove annotations forcompilers that are now unsupported.Differential Revision: https://reviews.llvm.org/D107787
[libc++] Disable incomplete library features.Adds a new CMake option to disable the usage of incomplete headers.These incomplete headers are not guaranteed to be ABI stable. Thisoption is intende
[libc++] Disable incomplete library features.Adds a new CMake option to disable the usage of incomplete headers.These incomplete headers are not guaranteed to be ABI stable. Thisoption is intended to be used by vendors so they can avoid their usersfrom code that's not ready for production usage.The option is enabled by default.Differential Revision: https://reviews.llvm.org/D106763
[libc++] Implement the output_iterator and output_range conceptsDifferential Revision: https://reviews.llvm.org/D106704
[libc++] Implement views::all_t and ranges::viewable_rangeDifferential Revision: https://reviews.llvm.org/D105816
[libc++] Remove random [[nodiscard]] in the test suite
[libc++] NFC: Fix synopsis comments and sort includes in ranges
[libcxx][nfc] Add one more test case for contiguous_range.If the `data` member function is different enough, `ranges::data` won't pick it, so the range remains a contiguous_range.
[libcxx][ranges] Add contiguous_range.Differential Revision: https://reviews.llvm.org/D104262
[libcxx][ranges] adds concept `sized_range` and cleans up `ranges::size`* adds `sized_range` and conformance tests* moves `disable_sized_range` into namespace `std::ranges`* removes explicit type
[libcxx][ranges] adds concept `sized_range` and cleans up `ranges::size`* adds `sized_range` and conformance tests* moves `disable_sized_range` into namespace `std::ranges`* removes explicit type parameterImplements part of P0896 'The One Ranges Proposal'.Differential Revision: https://reviews.llvm.org/D102434