| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc++] fix views::all hard error on lvalue move only views instead of SFINAE For an lvalue reference to a move only view x, views::all(x) gives hard error because the expression inside noexcept is not well formed and it is not SFINAE friendly. Given a move only view type V, and a concept template <class R> concept can_all = requires { std::views::all(std::declval<R>()); }; The expression can_all<V&> returns libstdc++: false msvc stl : false libc++ : error: static_cast from 'V' to 'typename decay<decltype((std::forward<V &>(__t)))>::type' (aka 'V') uses deleted function noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t)))) The standard spec has its own problem, the spec says it is expression equivalent to decay-copy(E) but the spec of decay-copy does not have any constraint, which means the expression decay-copy(declval<V&>()) is well-formed and the concept can_all<V&> should return true and should error when instantiating the function body of decay-copy. This is clearly wrong behaviour in the spec and we will probably create an LWG issue. But the libc++'s behaviour is clearly not correct. The noexcept is an "extension" in libc++ which is not in the spec, but the expression inside noexpect triggers hard error, which is not right. Reviewed By: #libc, ldionne, var-const Differential Revision: https://reviews.llvm.org/D128281 | 3 年前 | |
[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 | 4 年前 | |
[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 | 4 年前 | |
[libc++][ranges] Implement views::drop. The view itself has been implemented previously -- this patch only adds the ability to pipe it. Also finishes the implementation of [P1739](https://wg21.link/p1739) and [LWG3407](https://wg21.link/lwg3407). Differential Revision: https://reviews.llvm.org/D125156 | 4 年前 | |
[libc++] add global variable template std::views::empty [libc++] add global variable template std::views::empty Note it is neither a range adaptor, nor a CPO. It is simplify a global variable template. Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D122996 | 4 年前 | |
[libc++][test] Remove support old compiler support. The compilers clang-11, clang-12, and apple-clang-12 are no longer supported, so remove their annotations in the tests. Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D127588 | 3 年前 | |
[libc++] Removes unneeded includes. This removes all "TODO: remove these headers" comments from our headers. Note there seem to be more headers that can be removed, that will be done in separate commits. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D127592 | 3 年前 | |
[libc++][test] Refactor SmallBasicString uses in range.lazy.split tests The tests for std::ranges::lazy_split_view heavily use a wrapper class around std::string because std::string was not constexpr until recently. Where possible, remove the wrapper class and extra functionality no longer needed. Remove libcxx/test/std/ranges/range.adaptors/range.lazy.split/small_string.h and inline its one use remaining in libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp. Differential Revision: https://reviews.llvm.org/D126663 | 4 年前 | |
[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 | 4 年前 | |
[libc++][ranges] Implement views::drop. The view itself has been implemented previously -- this patch only adds the ability to pipe it. Also finishes the implementation of [P1739](https://wg21.link/p1739) and [LWG3407](https://wg21.link/lwg3407). Differential Revision: https://reviews.llvm.org/D125156 | 4 年前 | |
[libc++] add zip_view and views::zip for C++23 - add zip_view and views::zip for C++23 - added unit tests - implemented section 5.6 (zip) in P2321R2 I used clang-format to format the files but they look nothing like the rest of the code base. Manually indenting each line to match the styles sounds like an impossible task. Is there any clang-format file which can format it reasonable similar to the rest of the code base so that I can manually format the rest lines that look weird? Reviewed By: ldionne, #libc, philnik, var-const Spies: Mordante, philnik, libcxx-commits, mgorny Differential Revision: https://reviews.llvm.org/D122806 | 4 年前 | |
[libc++] P2321R2 section [tuple.tuple]. Adding C++23 constructors, assignment operators and swaps to tuple 1. for constructors that takes cvref variation of tuple<UTypes...>, there used to be two SFINAE helper _EnableCopyFromOtherTuple, _EnableMoveFromOtherTuple. And the implementations of these two helpers seem to slightly differ from the spec. But now, we need 4 variations. Instead of adding another two, this change refactored it to a single one _EnableCtrFromUTypesTuple, which directly maps to the spec without changing the C++11 behaviour. However, we need the helper __copy_cvref_t to get the type of std::get<i>(cvref tuple<Utypes...>) for different cvref, so I made __copy_cvref_t to be available in C++11. 2. for constructors that takes variations of std::pair, there used to be four helpers _EnableExplicitCopyFromPair, _EnableImplicitCopyFromPair, _EnableImplicitMoveFromPair, _EnableExplicitMoveFromPair. Instead of adding another four, this change refactored into two helper _EnableCtrFromPair and _BothImplicitlyConvertible. This also removes the need to use _nat 3. for const member assignment operator, since the requirement is very simple, I haven't refactored the old code but instead directly adding the new c++23 code. 4. for const swap, I pretty much copy pasted the non-const version to make these overloads look consistent 5. while doing these change, I found two of the old constructors wasn't marked constexpr for C++20 but they should. fixed them and added unit tests Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D116621 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 |