llvm-project/libcxx/test/std/ranges/range.adaptors
Hui Xie 16719cd011 [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
2022-06-24 07:12:53 +01:00
..
range.all [libc++] fix views::all hard error on lvalue move only views instead of SFINAE 2022-06-22 09:50:16 +01:00
range.common.view [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
range.counted [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
range.drop [libc++][ranges] Implement `views::drop`. 2022-05-10 09:31:05 -07:00
range.empty [libc++] add global variable template std::views::empty 2022-04-05 18:18:16 +02:00
range.filter [libc++][test] Remove support old compiler support. 2022-06-13 17:54:27 +02:00
range.join.view [libc++] Removes unneeded includes. 2022-06-13 17:56:50 +02:00
range.lazy.split [libc++][test] Refactor SmallBasicString uses in range.lazy.split tests 2022-06-11 13:10:02 -06:00
range.reverse [libc++] Replace _LIBCPP_HAS_NO_CONCEPTS with _LIBCPP_STD_VER > 17. NFCI. 2022-03-13 12:32:06 -04:00
range.take [libc++][ranges] Implement `views::drop`. 2022-05-10 09:31:05 -07:00
range.transform [libc++] add zip_view and views::zip for C++23 2022-04-25 12:22:22 +02:00
range.zip [libc++] P2321R2 section [tuple.tuple]. Adding C++23 constructors, assignment operators and swaps to `tuple` 2022-06-24 07:12:53 +01:00