Skip to content
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

Question regarding completion-signatures-for vs completion_signatures_of_t #1331

Open
jtsylve opened this issue May 17, 2024 · 1 comment
Open

Comments

@jtsylve
Copy link

jtsylve commented May 17, 2024

What is the difference between these two types in the spec?

I'm going under the assumption that they are defined separately because completion_signatures_of_t relies on get_completion_signatures which checks the return type of the member function with the same name, and completion-signatures-for is supposed to be used as a return type for that member function.

If the above is correct, should completion-signatures-for use the same logic as get_completion_signatures, but without the member function check?

@jiixyj
Copy link

jiixyj commented Aug 26, 2024

As far as I can tell, completion-signatures-for is only used as the return type for basic-sender's get_completion_signatures member function. Each basic-sender type will have different completion signatures, so one way of implementing it is one additional static function in the impls-for struct as in stdexec: https://github.com/NVIDIA/stdexec/blob/main/include/stdexec/__detail/__then.hpp#L74.

Calculating the completion signatures involves lots of tricky metaprogramming, so by specifying it like this they can keep some complexity out of the standard.

It looks like the order in which those things depend on each other is: completion_signatures_of_t -> get_completion_signatures -> completion-signatures-for.

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

No branches or pull requests

2 participants