cplusplus / sender-receiver

Issues list for P2300
Apache License 2.0
19 stars 3 forks source link

grant `connect` permission to return a type other than `decltype(sndr.connect(rcvr))` #281

Open ericniebler opened 2 months ago

ericniebler commented 2 months ago

@ispeters recent work on async stacks has involved changing the connect customization point to wrap the resulting operation state into one that maintains back pointers for reconstructing the stack.

The current specification of connect does not allow for that. We should loosen the requirements on the return type of connect.

This cannot be done after we ship connect.

lewissbaker commented 2 months ago

It's not clear to me that we can't do async-stacks using domain-based customization-points.

Since the connect() CPO is defined in terms of domain.transform_sender, we already have the ability to have connect(sdr, rcvr) return a different operation-state type than sdr.connect() since transform_sender can return a different sender type whose connect() member function returns a different operation-state type.