Skip to content

Conversation

@ispeters
Copy link
Contributor

This diff better aligns the implementation of associate with how it's worded in the spec; it moves the definition of the associate-sender's operation state type into the get_state function, making it a function-local class.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 11, 2026

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.

@ispeters ispeters force-pushed the move_associate_op_state branch 2 times, most recently from 51b0e1b to c6e7a7c Compare February 11, 2026 21:57
This diff better aligns the implementation of `associate` with how it's
worded in the spec; it moves the definition of the associate-sender's
operation state type into the `get_state` function, making it a
function-local class.
@ispeters ispeters force-pushed the move_associate_op_state branch from c6e7a7c to 9d49e68 Compare February 11, 2026 21:58
: __assoc_(std::move(__parts.first)) {
if (__assoc_) {
::new ((void*) std::addressof(__op_))
__op_t(STDEXEC::connect(std::move(*__parts.second), std::move(__rcvr)));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec doesn't fully-qualify this call to connect; it's required in stdexec to avoid an ambiguity with (I think) a member connect that's in scope here. I'm wondering if basic-sender has the same ambiguity as __sexpr_defaults.


void __run() noexcept {
if (__assoc_) {
STDEXEC::start(__op_);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call to start has the same problem as the above call to connect.

@ericniebler
Copy link
Collaborator

tbh i don't really want local classes for anything, ever. their mangled names are horrible and make diagnostics harder to read. i only used them in P2300 to make the spec more terse. my hope is that library implementers would liberally apply the AS-IF rule and use different implementation strategies.

@ispeters ispeters closed this Feb 12, 2026
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