From 29cf02f1bba26294b021d7e004d3865e3806174d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Mon, 1 Sep 2025 00:16:19 +0100 Subject: [PATCH 1/2] =?UTF-8?q?New=20issue=20from=20Dietmar=20K=C3=BChl:?= =?UTF-8?q?=20task::promise=5Ftype::return=5Fvalue=20default=20template=20?= =?UTF-8?q?parameter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xml/issue4345.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 xml/issue4345.xml diff --git a/xml/issue4345.xml b/xml/issue4345.xml new file mode 100644 index 0000000000..2039322445 --- /dev/null +++ b/xml/issue4345.xml @@ -0,0 +1,43 @@ + + + + +<code>task::promise_type::return_value</code> default template parameter +
+Dietmar Kühl +01 Sep 2025 +99 + + +

+The template parameter V of +task::promise_type::return_value doesn't have a default +template argument specified. Specifying a default template argument of T +would enable use of co_return { ... } which would be +consistent with normal return statements. This feature +was not discussed in the design paper but based on the LEWG discussion +on 2025-08-26 it is considered to be more a bug fix than a new feature. +

+
+ + +

+Add a default template argument of T to the template +parameter V of task::promise_type::return_value +in the synopsis of [task.promise]: +

+namespace std::execution {
+  template<class T, class Environment>
+  class task<T, Environment>::promise_type {
+     ...
+    template<typename V = T>
+    void return_value(V&& value);
+    ...
+  };
+
+}
+
+

+
+ +
From a1032dabb5ed152a781636e29176b6d90f4cf3a2 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 1 Sep 2025 21:28:43 +0100 Subject: [PATCH 2/2] Update xml/issue4345.xml --- xml/issue4345.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/issue4345.xml b/xml/issue4345.xml index 2039322445..2f7723ab0d 100644 --- a/xml/issue4345.xml +++ b/xml/issue4345.xml @@ -24,7 +24,7 @@ on 2025-08-26 it is considered to be more a bug fix than a new feature.

Add a default template argument of T to the template parameter V of task::promise_type::return_value -in the synopsis of [task.promise]: +in the synopsis of :

 namespace std::execution {
   template<class T, class Environment>