Skip to content

Commit 858ab8f

Browse files
committed
Improved wording for 4160
1 parent 880a6e6 commit 858ab8f

File tree

1 file changed

+50
-3
lines changed

1 file changed

+50
-3
lines changed

xml/issue4160.xml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ Set priority to 3 after reflector poll.
3030
"Shouldn't it be ill-formed only if instantiated?"
3131
</p>
3232

33-
</discussion>
34-
35-
<resolution>
33+
<superseded>
3634
<p>
3735
This wording is relative to <paper num="N4988"/>.
3836
</p>
@@ -71,6 +69,55 @@ namespace std {
7169
</blockquote>
7270
</li>
7371
</ol>
72+
</superseded>
73+
74+
<note>2025-02-07; Jonathan provides improved wording</note>
75+
76+
</discussion>
77+
78+
<resolution>
79+
<p>
80+
This wording is relative to <paper num="N5001"/>.
81+
</p>
82+
83+
<ol>
84+
<li><p>Modify <sref ref="[futures.task.general]"/> as indicated:</p>
85+
86+
<blockquote>
87+
<p>
88+
[&hellip;]
89+
<p/>
90+
-2- When the <tt>packaged_task</tt> object is invoked, its stored task is invoked and the result
91+
(whether normal or exceptional) stored in the shared state. Any futures that share the shared state
92+
will then be able to access the stored result.
93+
</p>
94+
<blockquote>
95+
<pre>
96+
namespace std {
97+
template&lt;class&gt; class packaged_task; // <i>not defined</i>
98+
99+
template&lt;class R, class... ArgTypes&gt;
100+
class packaged_task&lt;R(ArgTypes...)&gt; {
101+
[&hellip;]
102+
};
103+
104+
template&lt;class R, class... ArgTypes&gt;
105+
packaged_task(R (*)(ArgTypes...)) -&gt; packaged_task&lt;R(ArgTypes...)&gt;;
106+
107+
template&lt;class F&gt; packaged_task(F) -&gt; packaged_task&lt;<i>see below</i>&gt;;
108+
}
109+
</pre>
110+
</blockquote>
111+
<p>
112+
<ins>-?-
113+
If the definition of a specialization
114+
<code>packaged_task&lt;R(Args...)&gt;</code> is instantiated for
115+
an rvalue reference type `R`, the program is ill-formed.
116+
</ins>
117+
</p>
118+
</blockquote>
119+
</li>
120+
</ol>
74121
</resolution>
75122

76123
</issue>

0 commit comments

Comments
 (0)