Skip to content

Commit 9b0f34a

Browse files
authored
Merge pull request #517 from tomaszkam/tk/task-issues
New issue for US 230-360: Do not forward fn in completion_signatures
2 parents f6406c4 + 8b87f8a commit 9b0f34a

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

xml/issue4448.xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4448" status="New">
5+
<title>Do not forward `fn` in `completion_signatures`</title>
6+
<section>
7+
<sref ref="[exec.cmplsig]"/>
8+
</section>
9+
<submitter>Tomasz Kamiński</submitter>
10+
<date>05 Nov 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<b>Addresses <a href="https://github.com/cplusplus/nbballot/issues/935">US 230-360</a></b>
15+
<p>`fn` can be called multiple times and therefore should not be forwarded.</p>
16+
</discussion>
17+
18+
<resolution>
19+
<p>
20+
This wording is relative to <paper num="N5014"/>.
21+
</p>
22+
23+
<ol>
24+
25+
<li><p>Modify <sref ref="[exec.cmplsig]"/> as indicated:</p>
26+
27+
<p>-8-</p>
28+
<pre>
29+
namespace std::execution {
30+
template&lt;<i>completion-signature</i>... Fns&gt;
31+
struct completion_signatures {
32+
template&lt;class Tag&gt;
33+
static constexpr size_t <i>count-of</i>(Tag) { return <i>see below</i>; }
34+
35+
template&lt;class Fn&gt;
36+
static constexpr void <i>for-each</i>(Fn&amp;&amp; fn) { <i>// exposition only</i>
37+
(<del>std::forward&lt;Fn&gt;(fn)</del><ins>fn</ins>(static_cast&lt;Fns*&gt;(nullptr)), ...);
38+
}
39+
};
40+
41+
[&hellip;]
42+
}
43+
</pre>
44+
</li>
45+
</ol>
46+
47+
</resolution>
48+
49+
</issue>

0 commit comments

Comments
 (0)