[libcu++] Implement tuple-like constructors for pair#9543
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughRefactors Changescuda::std::pair constructor refactor and test suite update
Suggested reviewers
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_pair_like.pass.cpp (1)
78-85: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winsuggestion: use
std::complex<double>in this host-only__cpp_lib_tuple_likebranch. Line 81 currently usescuda::std::complex<double>, so this branch re-tests the cuda path instead of the host std tuple-like path.libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/move_pair_like.pass.cpp (1)
30-87: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winsuggestion: Consider adding a
TEST_FUNC bool test()wrapper and callingtest()frommain()for consistency with other pair tests (e.g.,non_const_pair_like.pass.cpp). IfMoveOnlypreventsconstexpr, document that limitation. Otherwise, addstatic_assert(test())to catch issues at compile-time.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8383ce8e-2917-4a37-a103-44b8699486ad
📒 Files selected for processing (13)
libcudacxx/include/cuda/std/__utility/pair.hlibcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_tuple_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_first_const_second_cxx03.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_move_pair_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_pair_U_V_cxx03.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_pair_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_const_move.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_copy.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_move.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_non_const_copy.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/move_pair_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/non_const_pair_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/not_constexpr_cxx11.fail.cpp
💤 Files with no reviewable changes (3)
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/not_constexpr_cxx11.fail.cpp
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_first_const_second_cxx03.pass.cpp
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_pair_U_V_cxx03.pass.cpp
| // test_pair_non_const<ConvertingType&&, int>(); | ||
| // test_pair_non_const<ConvertingType const&, int>(); | ||
| // test_pair_non_const<ConvertingType const&&, int>(); |
There was a problem hiding this comment.
Why can't these be tested? We don't care about dangling references in test code no?
There was a problem hiding this comment.
I believe the issue is that we should dissallow cnostruction from temporaries, but that requires relatively recent compilers
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2d1a9fc1-c175-4d4c-83e8-9dd2b65236b6
📒 Files selected for processing (13)
libcudacxx/include/cuda/std/__utility/pair.hlibcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_tuple_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_first_const_second_cxx03.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_move_pair_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_pair_U_V_cxx03.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_pair_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_const_move.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_copy.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_move.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_non_const_copy.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/move_pair_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/non_const_pair_like.pass.cpplibcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/not_constexpr_cxx11.fail.cpp
💤 Files with no reviewable changes (3)
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_first_const_second_cxx03.pass.cpp
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/const_pair_U_V_cxx03.pass.cpp
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/not_constexpr_cxx11.fail.cpp
✅ Files skipped from review due to trivial changes (1)
- libcudacxx/test/libcudacxx/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_tuple_like.pass.cpp
🚧 Files skipped from review as they are similar to previous changes (4)
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_copy.cpp
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_move.cpp
- libcudacxx/test/libcudacxx/std/utilities/utility/pairs/pairs.pair/convert_non_const_copy.cpp
- libcudacxx/include/cuda/std/__utility/pair.h
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 4d1f1e65-102b-4b33-991a-e3084cc9b780
📒 Files selected for processing (1)
libcudacxx/include/cuda/std/__fwd/get.h
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
😬 CI Workflow Results🟥 Finished in 4h 03m: Pass: 88%/118 | Total: 1d 18h | Max: 1h 03m | Hits: 99%/341045See results here. |
This implements the pair constructors for tuple-like types and slightly cleans up the constraints type