From cf27319d3f6e88fac3dccda8c116a5fbeddd6419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Mon, 1 Sep 2025 00:05:02 +0100 Subject: [PATCH 1/2] =?UTF-8?q?New=20issue=20from=20Dietmar=20K=C3=BChl:?= =?UTF-8?q?=20Missing=20rvalue=20reference=20qualification=20for=20task=5F?= =?UTF-8?q?scheduler::ts-sender::connect()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xml/issue4342.xml | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 xml/issue4342.xml diff --git a/xml/issue4342.xml b/xml/issue4342.xml new file mode 100644 index 0000000000..ffb452dbbd --- /dev/null +++ b/xml/issue4342.xml @@ -0,0 +1,55 @@ + + + + +Missing rvalue reference qualification for <code>task_scheduler::ts-sender::connect()</code> +
+Dietmar Kühl +01 Sep 2025 +99 + + +

+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. +

+
+ + +

+Add an rvalue qualifier to the declaration of connect in [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 [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 rcvr or copy thereof. +Returns an object of type state<Rcvr> containing an operation state +object initialized with connect(SENDER(*this), std::move(r)). +

+
+

+
+ +
From 878893d7bca51ee19a62c19417e09df0a8a690ff Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 1 Sep 2025 21:14:11 +0100 Subject: [PATCH 2/2] Apply suggestions from code review --- xml/issue4342.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/issue4342.xml b/xml/issue4342.xml index ffb452dbbd..d8bd6640d7 100644 --- a/xml/issue4342.xml +++ b/xml/issue4342.xml @@ -20,7 +20,7 @@ this function should be qualified with an rvalue reference.

-Add an rvalue qualifier to the declaration of connect in [exec.task.scheduler] paragraph 8: +Add an rvalue qualifier to the declaration of connect in paragraph 8:

 namespace std::execution {
@@ -36,7 +36,7 @@ namespace std::execution {
 

-In the specification in [exec.task.scheduler] paragraph 10 add an rvalue qualifier to connect: +In the specification in paragraph 10 add an rvalue qualifier to connect:

 template<receiver Rcvr>