Title
Is "the completion of the invocation of the constructor" considered as an expression?
Status
new
Section
[thread.thread.constr] [thread.thread.member]
Submitter
jim x

Created on 2025-08-06.00:00:00 last changed 3 weeks ago

Messages

Date: 2025-08-06.00:00:00

[thread.thread.constr] p6 says

The completion of the invocation of the constructor synchronizes with the beginning of the invocation of the copy of `f`.

The intended meaning is that "The completion of the invocation of the constructor" happens-before "the beginning of the invocation of the copy of `f`.", so we can infer other happen-before relationships based on this point.

However, according to the definition of "happens-before" ([intro.races] p7),

An evaluation A happens before an evaluation B (or, equivalently, B happens after A) if either

  1. (7.1) — […]

  2. (7.2) — A synchronizes with B, or

That means A and B are first required to be expressions because the evaluation is in terms of expressions.

However, "The completion of the invocation of the constructor" and "the beginning of the invocation of the copy of `f`" are not expressions.

The similar issue is [thread.thread.member] p4

The completion of the thread represented by `*this` synchronizes with ([intro.multithread]) the corresponding successful `join()` return.

History
Date User Action Args
2025-08-06 00:00:00admincreate