Skip to content

Commit

Permalink
Improved wording for 4160
Browse files Browse the repository at this point in the history
  • Loading branch information
jwakely committed Feb 7, 2025
1 parent 880a6e6 commit 858ab8f
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions xml/issue4160.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ Set priority to 3 after reflector poll.
"Shouldn't it be ill-formed only if instantiated?"
</p>

</discussion>

<resolution>
<superseded>
<p>
This wording is relative to <paper num="N4988"/>.
</p>
Expand Down Expand Up @@ -71,6 +69,55 @@ namespace std {
</blockquote>
</li>
</ol>
</superseded>

<note>2025-02-07; Jonathan provides improved wording</note>

</discussion>

<resolution>
<p>
This wording is relative to <paper num="N5001"/>.
</p>

<ol>
<li><p>Modify <sref ref="[futures.task.general]"/> as indicated:</p>

<blockquote>
<p>
[&hellip;]
<p/>
-2- When the <tt>packaged_task</tt> object is invoked, its stored task is invoked and the result
(whether normal or exceptional) stored in the shared state. Any futures that share the shared state
will then be able to access the stored result.
</p>
<blockquote>
<pre>
namespace std {
template&lt;class&gt; class packaged_task; // <i>not defined</i>

template&lt;class R, class... ArgTypes&gt;
class packaged_task&lt;R(ArgTypes...)&gt; {
[&hellip;]
};

template&lt;class R, class... ArgTypes&gt;
packaged_task(R (*)(ArgTypes...)) -&gt; packaged_task&lt;R(ArgTypes...)&gt;;

template&lt;class F&gt; packaged_task(F) -&gt; packaged_task&lt;<i>see below</i>&gt;;
}
</pre>
</blockquote>
<p>
<ins>-?-
If the definition of a specialization
<code>packaged_task&lt;R(Args...)&gt;</code> is instantiated for
an rvalue reference type `R`, the program is ill-formed.
</ins>
</p>
</blockquote>
</li>
</ol>
</resolution>

</issue>

0 comments on commit 858ab8f

Please sign in to comment.