You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEA]: P2655R3 common_reference_t of reference_wrapper Should Be a Reference Type #10475
Hi! I'd like to take this one (I have two merged-track PRs in the repo, #10563/#10564). Plan: port libc++'s P2655R3 implementation — the __ref_wrap_common_reference_exists_with constraint plus the two mutually exclusive basic_common_reference partial specializations — into cuda/std/__functional/reference_wrapper.h, translated to CCCL's C++17-compatible machinery: the constraint as a _CCCL_CONCEPT, applied through basic_common_reference's fifth SFINAE parameter (same pattern as the existing tuple specialization) rather than native requires clauses, so it works across all supported dialects. The asymmetric exists_with(R,T) && !exists_with(T,R) condition prevents the wrapper-vs-wrapper self-ambiguity from the earlier paper revisions. Fully host-testable — I'll add static_assert coverage for the basic/mirrored cases, wrapper-vs-wrapper (ambiguity regression), const-correctness, and a negative case where no specialization may apply.
Activity
HenrikGharagyozyan commentedon Aug 1, 2026
Hi! I'd like to take this one (I have two merged-track PRs in the repo, #10563/#10564). Plan: port libc++'s P2655R3 implementation — the
__ref_wrap_common_reference_exists_withconstraint plus the two mutually exclusivebasic_common_referencepartial specializations — intocuda/std/__functional/reference_wrapper.h, translated to CCCL's C++17-compatible machinery: the constraint as a_CCCL_CONCEPT, applied throughbasic_common_reference's fifth SFINAE parameter (same pattern as the existingtuplespecialization) rather than nativerequiresclauses, so it works across all supported dialects. The asymmetricexists_with(R,T) && !exists_with(T,R)condition prevents the wrapper-vs-wrapper self-ambiguity from the earlier paper revisions. Fully host-testable — I'll addstatic_assertcoverage for the basic/mirrored cases, wrapper-vs-wrapper (ambiguity regression), const-correctness, and a negative case where no specialization may apply.davebayer commentedon Aug 3, 2026
Hi @HenrikGharagyozyan, I assigned you to the issue