Skip to content

Commit 4938207

Browse files
committed
New issue from jim x: "Is "the completion of the invocation of the constructor" considered as an expression?"
1 parent e6edf12 commit 4938207

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

xml/issue4310.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4310" status="New">
5+
<title>Is "the completion of the invocation of the constructor" considered as an expression?</title>
6+
<section>
7+
<sref ref="[thread.thread.constr]"/>
8+
<sref ref="[thread.thread.member]"/>
9+
</section>
10+
<submitter>jim x</submitter>
11+
<date>06 Aug 2025</date>
12+
<priority>99</priority>
13+
14+
<discussion>
15+
<p>
16+
<sref ref="[thread.thread.constr]"/> p6 says
17+
</p>
18+
<blockquote style="border-left: 3px solid #ccc;padding-left: 15px;">
19+
<p>
20+
The completion of the invocation of the constructor synchronizes with the beginning of the invocation of the copy of `f`.
21+
</p>
22+
</blockquote>
23+
<p>
24+
The intended meaning is that "The completion of the invocation of the constructor" happens-before
25+
"the beginning of the invocation of the copy of `f`.", so we can infer other happen-before relationships
26+
based on this point.
27+
<p/>
28+
However, according to the definition of "happens-before" (<sref ref="[intro.races]"/> p7),
29+
</p>
30+
<blockquote style="border-left: 3px solid #ccc;padding-left: 15px;">
31+
<p>
32+
An evaluation <i>A</i> <i>happens before</i> an evaluation <i>B</i> (or, equivalently, <i>B</i>
33+
happens after <i>A</i>) if either
34+
</p>
35+
<ol style="list-style-type: none">
36+
<li><p>(7.1) &mdash; [&hellip;]</p></li>
37+
<li><p>(7.2) &mdash; <i>A</i> synchronizes with <i>B</i>, or</p></li>
38+
</ol>
39+
</blockquote>
40+
<p>
41+
That means <i>A</i> and <i>B</i> are first required to be expressions because the evaluation is
42+
in terms of expressions.
43+
<p/>
44+
However, "The completion of the invocation of the constructor" and "the beginning of the invocation
45+
of the copy of `f`" are not expressions.
46+
<p/>
47+
The similar issue is <sref ref="[thread.thread.member]"/> p4
48+
</p>
49+
<blockquote style="border-left: 3px solid #ccc;padding-left: 15px;">
50+
<p>
51+
The completion of the thread represented by `*this` synchronizes with (<sref ref="[intro.multithread]"/>)
52+
the corresponding successful `join()` return.
53+
</p></blockquote>
54+
</discussion>
55+
56+
<resolution>
57+
</resolution>
58+
59+
</issue>

0 commit comments

Comments
 (0)