From f576e2ff0708744c7b25ced3b14b4ef7c28609b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sun, 31 Aug 2025 23:57:36 +0100 Subject: [PATCH 1/4] =?UTF-8?q?New=20issue=20from=20Dietmar=20K=C3=BChl:?= =?UTF-8?q?=20>Missing=20rvalue=20reference=20qualification=20for=20task::?= =?UTF-8?q?connect()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xml/issue4341.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 xml/issue4341.xml diff --git a/xml/issue4341.xml b/xml/issue4341.xml new file mode 100644 index 0000000000..251c089847 --- /dev/null +++ b/xml/issue4341.xml @@ -0,0 +1,51 @@ + + + + +>Missing rvalue reference qualification for <code>task::connect()</code> +
+Dietmar Kühl +31 Aug 2025 +99 + + +

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

+
+ + +

+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) is true.

+

-4- Effects: Equivalent to:

+
    return state<Rcvr>(exchange(handle, {}), std::forward<Rcvr>(recv));
+
+

+
+ +
From 887e1c0a8f14b1d3893f281a5a168ca9ff9ed869 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 1 Sep 2025 18:03:50 +0100 Subject: [PATCH 2/4] Update xml/issue4341.xml --- xml/issue4341.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/issue4341.xml b/xml/issue4341.xml index 251c089847..95c916350e 100644 --- a/xml/issue4341.xml +++ b/xml/issue4341.xml @@ -19,7 +19,7 @@ but currently it isn't.

-In the synopsis in [task.class] add rvalue +In the synopsis in add rvalue reference qualification to task::connect():

 namespace std::execution {

From abcbe4bceaafa758ca93e82b51162692ec83dab1 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely 
Date: Mon, 1 Sep 2025 18:04:11 +0100
Subject: [PATCH 3/4] Update xml/issue4341.xml

---
 xml/issue4341.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xml/issue4341.xml b/xml/issue4341.xml
index 95c916350e..ac26c60f3a 100644
--- a/xml/issue4341.xml
+++ b/xml/issue4341.xml
@@ -34,7 +34,7 @@ namespace std::execution {
 

-In the specification in [task.members] paragraph 3 add rvalue +In the specification in paragraph 3 add rvalue reference qualification to task::connect():


From e5bc3456415f196f5bfeeef6b1a1d30c65241dc9 Mon Sep 17 00:00:00 2001
From: Jonathan Wakely 
Date: Mon, 1 Sep 2025 18:06:11 +0100
Subject: [PATCH 4/4] Update xml/issue4341.xml

---
 xml/issue4341.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xml/issue4341.xml b/xml/issue4341.xml
index ac26c60f3a..555d64ad31 100644
--- a/xml/issue4341.xml
+++ b/xml/issue4341.xml
@@ -2,7 +2,7 @@
 
 
 
->Missing rvalue reference qualification for <code>task::connect()</code>
+Missing rvalue reference qualification for <code>task::connect()</code>
 
Dietmar Kühl 31 Aug 2025