[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
show more ...
[libc++] Add missing std:: qualification to __synth_three_way.This might be unobservable, since __synth_three_way is only evercalled as a result of using an (ADL) operator on std::pair or std::tup
[libc++] Add missing std:: qualification to __synth_three_way.This might be unobservable, since __synth_three_way is only evercalled as a result of using an (ADL) operator on std::pair or std::tuple.
[libc++] Revert "Protect users from relying on detail headers" & related changesThis commit reverts 5aaefa51 (and also partly 7f285f48e77 and b6d75682f9,which were related to the original commit).
[libc++] Revert "Protect users from relying on detail headers" & related changesThis commit reverts 5aaefa51 (and also partly 7f285f48e77 and b6d75682f9,which were related to the original commit). As landed, 5aaefa51 hadunintended consequences on some downstream bots and didn't have propercoverage upstream due to a few subtle things. Implementing this issomething we should do in libc++, however we'll first need to addressa few issues listed in https://reviews.llvm.org/D106124#3349710.Differential Revision: https://reviews.llvm.org/D120683
[libcxx][modules] protects users from relying on detail headerslibc++ has started splicing standard library headers into much morefine-grained content for maintainability. It's very likely that ou
[libcxx][modules] protects users from relying on detail headerslibc++ has started splicing standard library headers into much morefine-grained content for maintainability. It's very likely that outdatedand naive tooling (some of which is outside of LLVM's scope) willsuggest users include things such as <__ranges/access.h> instead of<ranges>, and Hyrum's law suggests that users will eventually begin torely on this without the help of tooling. As such, this commitintends to protect users from themselves, by making it a hard error foranyone outside of the standard library to include libc++ detail headers.Differential Revision: https://reviews.llvm.org/D106124
[libc++] Normalize all our '#pragma GCC system_header', and regression-test.Now we'll notice if a header forgets to include this magic phrase.Differential Revision: https://reviews.llvm.org/D1188
[libc++] Normalize all our '#pragma GCC system_header', and regression-test.Now we'll notice if a header forgets to include this magic phrase.Differential Revision: https://reviews.llvm.org/D118800
[libc++] [NFC] s/_LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)/!defined(_LIBCPP_HAS_NO_CONCEPTS)/Per Discord discussion, we're normalizing on a simple `!defined(_LIBCPP_HAS_NO_CONCEPTS)
[libc++] [NFC] s/_LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)/!defined(_LIBCPP_HAS_NO_CONCEPTS)/Per Discord discussion, we're normalizing on a simple `!defined(_LIBCPP_HAS_NO_CONCEPTS)`so that we can do a big search-and-replace for `!defined(_LIBCPP_HAS_NO_CONCEPTS)`back into `_LIBCPP_STD_VER > 17` when we're ready to abandon support for concept-syntax-lesscompilers.Differential Revision: https://reviews.llvm.org/D118748
[libc++] [P1614] Implement the second half of [cmp.alg]: compare_{strong,weak,partial}_fallback.The tests for these are just copy-pasted from the tests for std::{strong,weak,partial}_order,and the
[libc++] [P1614] Implement the second half of [cmp.alg]: compare_{strong,weak,partial}_fallback.The tests for these are just copy-pasted from the tests for std::{strong,weak,partial}_order,and then I added an extra clause in each (test_2()) to test the stuff that's not just the sameas std::*_order.This also includes the fix for https://wg21.link/LWG3465 (which falls naturally out of the"you must write it three times" style, but I've added test cases for it also).There is an action item here to go back and give good diagnostics for SFINAE failuresin these CPOs. I've filed this as https://github.com/llvm/llvm-project/issues/53456 .Differential Revision: https://reviews.llvm.org/D111514
[libc++] Alphabetize header #includes. NFCI.The NFC part of D116809. We still want to enforce this in CI,but the mechanism for that is still to-be-determined.Differential Revision: https://revie
[libc++] Alphabetize header #includes. NFCI.The NFC part of D116809. We still want to enforce this in CI,but the mechanism for that is still to-be-determined.Differential Revision: https://reviews.llvm.org/D116809
[libc++] Remove unneeded `std::` qualifications from <compare>. NFCI.Reviewed as part of D115177.
[libc++] [P1614] Implement [cmp.alg]'s std::{strong,weak,partial}_order.This does not include `std::compare_*_fallback`; those are coming later.There's still an open question of how to implement
[libc++] [P1614] Implement [cmp.alg]'s std::{strong,weak,partial}_order.This does not include `std::compare_*_fallback`; those are coming later.There's still an open question of how to implement std::strong_orderfor `long double`, which has 80 value bits and 48 padding bits on x86-64,and which is presumably *not* IEEE 754-compliant on PPC64 and so on.So that part is left unimplemented.Differential Revision: https://reviews.llvm.org/D110738
[libc++] Remove _LIBCPP_HAS_NO_SPACESHIP_OPERATORAll supported compilers support spaceship in C++20 nowadays.Differential Revision: https://reviews.llvm.org/D113938
[libc++] [P1614] Implement std::compare_three_way.Differential Revision: https://reviews.llvm.org/D110735
[libc++] [compare] Named comparison functions, is_eq etc.Some of these were previously half-implemented in "ordering.h";now they're all implemented, and tested.Note that `constexpr` functions are
[libc++] [compare] Named comparison functions, is_eq etc.Some of these were previously half-implemented in "ordering.h";now they're all implemented, and tested.Note that `constexpr` functions are implicitly `inline`, so thestandard wording omits `inline` on these; but Louis and I agreethat that's surprising and it's better to be explicit about it.Differential Revision: https://reviews.llvm.org/D110515
[libc++] [compare] Rip out more vestiges of *_equality. NFCI.There's really no reason to even have two different enums here,but *definitely* we shouldn't have *three*, and they don't needso many
[libc++] [compare] Rip out more vestiges of *_equality. NFCI.There's really no reason to even have two different enums here,but *definitely* we shouldn't have *three*, and they don't needso many synonymous enumerator values.Differential Revision: https://reviews.llvm.org/D110516
[libc++][spaceship] Implement std::pair::operator<=>Implements parts of P1614, including synth-three-way and three way comparison for std::pair.Reviewed By: #libc, Quuxplusone, MordanteDifferen
[libc++][spaceship] Implement std::pair::operator<=>Implements parts of P1614, including synth-three-way and three way comparison for std::pair.Reviewed By: #libc, Quuxplusone, MordanteDifferential Revision: https://reviews.llvm.org/D107721
[libc++][NFC] Add missing whitespace in <compare>
[libc++] Add some missing _LIBCPP_HIDE_FROM_ABI markupAlso, as a fly-by fix, use `inline` directly to define inline variables(all compilers support it).Differential Revision: https://reviews.llv
[libc++] Add some missing _LIBCPP_HIDE_FROM_ABI markupAlso, as a fly-by fix, use `inline` directly to define inline variables(all compilers support it).Differential Revision: https://reviews.llvm.org/D110208
[libc++][compare] Implement three_way_comparable[_with] conceptsImplementation of `three_way_comparable` and `three_way_comparable_with` concepts from <compare> header.Please note that I have tem
[libc++][compare] Implement three_way_comparable[_with] conceptsImplementation of `three_way_comparable` and `three_way_comparable_with` concepts from <compare> header.Please note that I have temporarily removed `<compare>` header from `<utility>` due to cyclic dependency that prevents using `<concepts>` header in `<compare>` one.I tried to quickly resolve those issues including applying suggestions from @cjdb and dive deeper by myself but the problem seems more complicated that we thought initially.I am in progress to prepare the patch with resolving this cyclic dependency between headers but for now I decided to put all that I have to the review to unblock people that depend on that functionality. At first glance the patch with resolving cyclic dependency is not so small (unless I find the way to make it smaller and cleaner) so I don't want to mix everything to one review.Reviewed By: ldionne, cjdb, #libc, QuuxplusoneDifferential Revision: https://reviews.llvm.org/D103478
[libc++] [P1614] Implement std::compare_three_way_result.Differential Revision: https://reviews.llvm.org/D103581
[libc++][modularisation] Split <compare> into internal headers.Differential Revision: https://reviews.llvm.org/D106107