File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =' 1.0' encoding =' utf-8' standalone =' no' ?>
2
+ <!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3
+
4
+ <issue num =" 4345" status =" New" >
5
+ <title ><code >task::promise_type::return_value</code > default template parameter</title >
6
+ <section ><sref ref =" [task.promise]" /></section >
7
+ <submitter >Dietmar Kühl</submitter >
8
+ <date >01 Sep 2025</date >
9
+ <priority >99</priority >
10
+
11
+ <discussion >
12
+ <p >
13
+ The template parameter <code >V</code > of
14
+ <code >task::promise_type::return_value</code > doesn't have a default
15
+ template argument specified. Specifying a default template argument of <code >T</code >
16
+ would enable use of <code >co_return { ... }</code > which would be
17
+ consistent with normal <code >return</code > statements. This feature
18
+ was not discussed in the design paper but based on the LEWG discussion
19
+ on 2025-08-26 it is considered to be more a bug fix than a new feature.
20
+ </p >
21
+ </discussion >
22
+
23
+ <resolution >
24
+ <p >
25
+ Add a default template argument of <code >T</code > to the template
26
+ parameter <code >V</code > of <code >task::promise_type::return_value</code >
27
+ in the synopsis of <sref ref =" [task.promise]" />:
28
+ <blockquote ><pre >
29
+ namespace std::execution {
30
+ template< class T, class Environment>
31
+ class task< T, Environment> ::promise_type {
32
+ ...
33
+ template< typename V <ins >= T</ins >>
34
+ void return_value(V&& value);
35
+ ...
36
+ };
37
+
38
+ }
39
+ </pre ></blockquote >
40
+ </p >
41
+ </resolution >
42
+
43
+ </issue >
You can’t perform that action at this time.
0 commit comments