-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example 1.5.1 "then" doesn't seem to work. #301
Comments
The example also fails if the function must take an input value. Trying to figure this out from compiler messages and reading the For example, I cannot copy code from I think it's important that we have at least a minimal working example that shows how you'd write a In particular, P2300r10 says that "it's a challenge" to write the completion signatures for a sender. No kidding. An example is with 1000 pages of standardize. How do I write the completion signatures? |
For anyone who finds this issue, Maikel Nadolski offers a "naive solution" here. It's for exposition only. |
Yes, I agree that the examples given for Generally, you need to explicitly handle the void/non-void and throwing/non-throwing cases separately to ensure that you instantiation the right overloads of For handling the computation of the completion-signatures, the stdexec library uses a helper called And the example usage of this in Having said that, I'm not sure what the actionable item is here. |
I believe that I've identified two issues with the examples.
_then_sender
fail when the function returnsvoid
. (error: invalid parameter type 'std::__success_type<void>::type' {aka 'void'}
) Some guidance needs to be given on how to handle void return types!_then_receiver
relies onbase()
being a member of the parent class receiver; however,base()
isn't part of the specification anywhere. Would it be plausible to have the examplestatic_cast<R&&>(std::move(*this))
, or is that somehow wrong. If so, the example needs further exposition on what the example is doing.The text was updated successfully, but these errors were encountered: