Created on 2025-08-31.00:00:00 last changed 2 weeks ago
Proposed resolution:
In the synopsis in [task.class] add rvalue
reference qualification to task::connect()
:
namespace std::execution { template<class T, class Environment> class task { ... template<receiver Rcvr> state<Rcvr> connect(Rcvr&& rcvr) &&; ... } }
In the specification in [task.members] paragraph 3 add rvalue
reference qualification to task::connect()
:
template<receiver Rcvr> state<Rcvr> connect(Rcvr&& rcvr) &&;-3- Precondition:
bool(handle)
istrue
.-4- Effects: Equivalent to:
return state<Rcvr>(exchange(handle, {}), std::forward<Rcvr>(recv));
Coroutines can't be copied. Thus, a task
can be
connect()
just once. To represent that
task::connect()
should be rvalue reference qualified
but currently it isn't.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-09-01 17:08:00 | admin | set | messages: + msg14998 |
2025-08-31 00:00:00 | admin | create |