File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-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 =" 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< <i >completion-signature</i >... Fns>
31+ struct completion_signatures {
32+ template< class Tag>
33+ static constexpr size_t <i >count-of</i >(Tag) { return <i >see below</i >; }
34+
35+ template< class Fn>
36+ static constexpr void <i >for-each</i >(Fn&& fn) { <i >// exposition only</i >
37+ (<del >std::forward< Fn> (fn)</del ><ins >fn</ins >(static_cast< Fns*> (nullptr)), ...);
38+ }
39+ };
40+
41+ [… ]
42+ }
43+ </pre >
44+ </li >
45+ </ol >
46+
47+ </resolution >
48+
49+ </issue >
You can’t perform that action at this time.
0 commit comments