This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

4310. Is "the completion of the invocation of the constructor" considered as an expression?

Section: 32.4.3.3 [thread.thread.constr], 32.4.3.6 [thread.thread.member] Status: New Submitter: jim x Opened: 2025-08-06 Last modified: 2025-08-09

Priority: Not Prioritized

View other active issues in [thread.thread.constr].

View all other issues in [thread.thread.constr].

View all issues with New status.

Discussion:

32.4.3.3 [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" (6.10.2.2 [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 32.4.3.6 [thread.thread.member] p4

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

Proposed resolution: