forked from cplusplus/LWG
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathissue4345.xml
More file actions
43 lines (38 loc) · 1.37 KB
/
issue4345.xml
File metadata and controls
43 lines (38 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version='1.0' encoding='utf-8' standalone='no'?>
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
<issue num="4345" status="New">
<title><code>task::promise_type::return_value</code> default template parameter</title>
<section><sref ref="[task.promise]"/></section>
<submitter>Dietmar Kühl</submitter>
<date>01 Sep 2025</date>
<priority>99</priority>
<discussion>
<p>
The template parameter <code>V</code> of
<code>task::promise_type::return_value</code> doesn't have a default
template argument specified. Specifying a default template argument of <code>T</code>
would enable use of <code>co_return { ... }</code> which would be
consistent with normal <code>return</code> 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.
</p>
</discussion>
<resolution>
<p>
Add a default template argument of <code>T</code> to the template
parameter <code>V</code> of <code>task::promise_type::return_value</code>
in the synopsis of <a href="https://wg21.link/task.promise">[task.promise]</a>:
<blockquote><pre>
namespace std::execution {
template<class T, class Environment>
class task<T, Environment>::promise_type {
...
template<typename V <ins>= T</ins>>
void return_value(V&& value);
...
};
}
</pre></blockquote>
</p>
</resolution>
</issue>