Skip to content

Commit 78b7a53

Browse files
committed
New issue from Brian Bi: "Wrong deduced return type in [exec.schedule.from]"
1 parent 50d6df1 commit 78b7a53

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

xml/issue4524.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4524" status="New">
5+
<title>Wrong deduced return type in [exec.schedule.from]</title>
6+
<section><sref ref="[exec.schedule.from]"/></section>
7+
<submitter>Brian Bi</submitter>
8+
<date>20 Jan 2026</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
I think there's a problem in the definition of <tt><i>receiver-type</i></tt> in
14+
<sref ref="[exec.schedule.from]"/> p10:
15+
<p/>
16+
When <tt><i>state-type</i></tt> is instantiated, `operation_t` must be determined.
17+
To determine `operation_t`, we need to know the environment type for `receiver_t`,
18+
which requires instantiating the definition of `receiver_t::get_env` because of the
19+
deduced return type. That definition requires <tt><i>state-type</i></tt> to be
20+
already complete because it uses <tt><i>state</i>-&gt;<i>rcvr</i></tt>, so we
21+
have a circular dependency.
22+
<p/>
23+
The return type should probably be written out explicitly as
24+
<tt><i>FWD-ENV-T</i>(env_of_t&lt;Rcvr&gt;)</tt> or something like that (except that
25+
it seems like `Rcvr` is already "out of scope" here, so I don't know how to word it exactly).
26+
</p>
27+
</discussion>
28+
29+
<resolution>
30+
</resolution>
31+
32+
</issue>

0 commit comments

Comments
 (0)