Skip to content

Commit d8ede75

Browse files
committed
New issue from Eric: let_[*].transform_env is specified in terms of the let_* sender itself instead of its child
1 parent 7919edf commit d8ede75

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

xml/issue4205.xml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4205" status="New">
5+
<title>`let_[*].transform_env` is specified in terms of the `let_*` sender itself instead of its child</title>
6+
<section><sref ref="[exec.let]"/></section>
7+
<submitter>Eric Niebler</submitter>
8+
<date>04 Feb 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
Imported from <a href="https://github.com/cplusplus/sender-receiver/issues/319">cplusplus/sender-receiver #319</a>.
14+
</p>
15+
<p>
16+
<sref ref="[exec.let]"/> para 13 reads:
17+
18+
<blockquote>
19+
13.
20+
Let `sndr` and `env` be subexpressions, and let `Sndr` be `decltype((sndr))`.
21+
If
22+
<code><i>sender-for</i>&lt;Sndr, <i>decayed-typeof</i>&lt;<i>let-cpo</i>&gt;&gt;</code>
23+
is <code>false</code>,
24+
then the expression `let-cpo</i>.transform_env(sndr, env)` is ill-formed.
25+
Otherwise, it is equal to
26+
<code><i>JOIN-ENV</i>(<i>let-env</i>(sndr), <i>FWD-ENV</i>(env))</code>.
27+
</blockquote>
28+
29+
The sender passed to <i>`let-env`</i> here should be the <i>child</i> of `sndr`.
30+
31+
</p>
32+
</discussion>
33+
34+
<resolution>
35+
<p>
36+
This wording is relative to <paper num="N5001"/>.
37+
</p>
38+
39+
<ol>
40+
<li>
41+
Modify <sref ref="[exec.let]"/> as indicated:
42+
<blockquote>
43+
-13-
44+
Let `sndr` and `env` be subexpressions, and let `Sndr` be `decltype((sndr))`.
45+
If
46+
<code><i>sender-for</i>&lt;Sndr, <i>decayed-typeof</i>&lt;<i>let-cpo</i>&gt;&gt;</code>
47+
is <code>false</code>,
48+
then the expression `let-cpo</i>.transform_env(sndr, env)` is ill-formed.
49+
Otherwise, it is equal to
50+
<del>
51+
<code><i>JOIN-ENV</i>(<i>let-env</i>(sndr), <i>FWD-ENV</i>(env))</code>.
52+
</del>
53+
<ins><pre><code>
54+
auto&amp; [_, _, child] = sndr;
55+
return <i>JOIN-ENV</i>(<i>let-env</i>(child), <i>FWD-ENV</i>(env));
56+
</code></pre></ins>
57+
</blockquote>
58+
</li>
59+
</ol>
60+
61+
</resolution>
62+
63+
</issue>

0 commit comments

Comments
 (0)