[libcu++] Partially implement P2591R5 Concatenation of strings and string views - #10706
[libcu++] Partially implement P2591R5 Concatenation of strings and string views#10706davebayer wants to merge 1 commit into
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesString-view interoperability
Suggested reviewers: Comment |
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: c72301c7-c0e4-45d5-b7cd-e3be4cc97113
📒 Files selected for processing (2)
libcudacxx/include/cuda/std/string_viewlibcudacxx/test/libcudacxx/cuda/strings/std_interop/string.view.operator_plus.pass.cpp
⏱️ CCCL compile-time benchmark comparison: Public headers compile-time benchResult: 0 regression row(s), 6 improvement row(s) above threshold.
Artifacts: reports and traces Direct file processing
🟢 Direct file processing — Improvements
|
😬 CI Workflow Results🟥 Finished in 2h 21m: Pass: 95%/115 | Total: 3d 22h | Max: 2h 15m | Hits: 48%/861037See results here. AI failure analysis1. NVCC/MSVC rejects custom-traits string concatenation during constant evaluation · 5 jobsExplanation: All five C++20 Windows matrices fail compiling the new string-view concatenation test at static_assert(test()). The NVCC constant evaluator reaches cuda::std::char_traits::move through std::basic_string::append and rejects a relational comparison between pointers to unrelated objects. Evidence: libcu++ nvcc MSVC / [CTK12.0 MSVC14.39 C++20] Build(amd64), step 4 libcu++ nvcc MSVC / [CTK13.3 MSVC14.44 C++20] Build(amd64), step 4 Root cause: The new constexpr test instantiates std::basic_string with CustomCharTraits derived from cuda::std::char_traits. The added operator+ calls std::basic_string::append; MSVC then calls CustomCharTraits::move, whose constexpr memmove implementation tests __src < __dst even though the source literal and destination string storage are unrelated, which NVCC correctly refuses as a constant expression. Sources: libcudacxx/test/libcudacxx/cuda/strings/std_interop/string.view.operator_plus.pass.cpp:45, libcudacxx/test/libcudacxx/cuda/strings/std_interop/string.view.operator_plus.pass.cpp:148, libcudacxx/test/libcudacxx/cuda/strings/std_interop/string.view.operator_plus.pass.cpp:177, libcudacxx/include/cuda/std/string_view:880, libcudacxx/include/cuda/std/__string/constexpr_c_functions.h:409. Suggested next steps: Reproduce only string.view.operator_plus.pass.cpp with an NVCC/MSVC C++20 configuration and determine whether __cccl_memmove_impl_constexpr can avoid ordering unrelated pointers. If that helper cannot be made conforming for this toolchain, exclude only the custom-traits portion from NVCC/MSVC constant evaluation while retaining its runtime coverage and the default-traits static assertion; then rerun the targeted libcudacxx.test.lit.precompile target. Copy this prompt into a coding agentJobs: |
Implements
cuda::std::string_viewinteroperability withstd::string(#10255).