Skip to content

Forward non-completion queries through affine and starts_on attrs - #2374

Open
Cra3z wants to merge 2 commits into
NVIDIA:mainfrom
Cra3z:starts_on_and_affine_attrs
Open

Cra3z wants to merge 2 commits into
NVIDIA:mainfrom
Cra3z:starts_on_and_affine_attrs

Conversation

@Cra3z

@Cra3z Cra3z commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Forward non-completion-queries to affine and starts_on sender attributes

  • Forward non-completion-queries from the child sender's sender-attributes to the sender-attributes of affine and starts_on.
  • Fix an issue where affine's forwarding of non-completion-queries did not actually invoke the query and unnecessarily required the query result to be default-constructible.

@copy-pr-bot

copy-pr-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericniebler
ericniebler force-pushed the starts_on_and_affine_attrs branch from 9769d49 to 0ce499b Compare October 30, 2026 20:09
@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test 0ce499b

@Cra3z

Cra3z commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

@ericniebler
The CI failures were caused by starts_on's constrained query member template for forwarding non-completion queries not SFINAE-friendly. Its trailing return type directly uses __query_result_t, causing a hard error during instantiation of the enclosing class template when the child environment does not support the query, rather than allowing the constraint to remove the member template from the candidate set. A minimal reproducer is available on https://godbolt.org/z/xY37b5eGq.

The same pattern occurs in several other adaptors. It can be addressed either by using return type deduction to defer type instantiation or by applying a workaround like the defaulted class _Env2 = env_of_t<_Sender> parameter in

template <class _Env2 = env_of_t<_Sender>, __forwarding_query _Query, class... _Args>
This change uses return type deduction.

@Cra3z
Cra3z force-pushed the starts_on_and_affine_attrs branch from 895cee5 to ae6346c Compare October 31, 2026 04:27
@Cra3z
Cra3z requested a review from ericniebler October 31, 2026 04:30
@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test ae6346c

@Cra3z
Cra3z force-pushed the starts_on_and_affine_attrs branch from ae6346c to e1a3724 Compare October 31, 2026 05:12
@Cra3z
Cra3z force-pushed the starts_on_and_affine_attrs branch from e1a3724 to 8e50914 Compare October 31, 2026 05:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants