Question regarding completion-signatures-for vs completion_signatures_of_t
jtsylve opened this issue · 1 comments
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?
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
.