We've never really discussed void. One of the most annoying things about writing futures today is dealing with void. E.g. you end up doing:
template <typename T>
struct continuatble_future;
template <typename T>
struct continuable_future
{
template <typename Executor>
auto via(Executor&& exec);
template <typename Continuation>
continuable_future</*...*/> then(Continuation&& c);
};
template <t>
struct continuable_future<void>
{
template <typename Executor>
auto via(Executor&& exec);
template <typename Continuation>
continuable_future</*...*/> then(Continuation&& c);
};
The executors proposal does special case void as well - so perhaps the burden has moved to executor authors instead of future authors (although often they are the same person).
I'd like to discuss alternatives to void. void isn't regular, so it complicates everything - from the wording to the implementation.
We've never really discussed void. One of the most annoying things about writing futures today is dealing with
void. E.g. you end up doing:The executors proposal does special case
voidas well - so perhaps the burden has moved to executor authors instead of future authors (although often they are the same person).I'd like to discuss alternatives to
void.voidisn't regular, so it complicates everything - from the wording to the implementation.