This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively Ready status.
task_scheduler::ts-sender::connect()Section: 33.13.5 [exec.task.scheduler] Status: Tentatively Ready Submitter: Dietmar Kühl Opened: 2025-09-01 Last modified: 2025-10-27
Priority: Not Prioritized
View other active issues in [exec.task.scheduler].
View all other issues in [exec.task.scheduler].
View all issues with Tentatively Ready status.
Discussion:
Addresses US 237-369
The result of schedule(sched) for a scheduler
sched is only required to be movable. An object of
this type may need to be forwarded to an operation state constructor
by task_scheduler::ts-sender::connect. Thus,
this function should be qualified with an rvalue reference.
[2025-10-17; Reflector poll.]
Set status to Tentatively Ready after six votes in favour during reflector poll.
Proposed resolution:
Add an rvalue qualifier to the declaration of connect in 33.13.5 [exec.task.scheduler] paragraph 8:
namespace std::execution {
class task_scheduler::ts-sender { // exposition only
public:
using sender_concept = sender_t;
template<receiver Rcvr>
state<Rcvr> connect(Rcvr&& rcvr) &&;
};
}
In the specification in 33.13.5 [exec.task.scheduler] paragraph 10 add an rvalue qualifier to connect:
template<receiver Rcvr> state<Rcvr> connect(Rcvr&& rcvr) &&;-10- Effects: Let r be an object of a type that models receiver and whose completion handlers result in invoking the corresponding completion handlers of
rcvror copy thereof. Returns an object of typestate<Rcvr>containing an operation state object initialized withconnect(SENDER(*this), std::move(r)).