Created on 2025-08-31.00:00:00 last changed 5 days 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));
[ Kona 2025-11-08; Status changed: Voting → WP. ]
[ 2025-10-17; Reflector poll. ]
Set status to Tentatively Ready after five votes in favour during reflector poll.
"It's nice to rvalue qualify such a function, but it is not strictly necessary."
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-11-11 10:48:16 | admin | set | status: voting -> wp |
| 2025-10-30 17:45:31 | admin | set | status: ready -> voting |
| 2025-10-27 09:58:11 | admin | set | messages: + msg15445 |
| 2025-10-17 14:12:23 | admin | set | messages: + msg15220 |
| 2025-10-17 14:12:23 | admin | set | status: new -> ready |
| 2025-09-01 17:08:00 | admin | set | messages: + msg14998 |
| 2025-08-31 00:00:00 | admin | create | |