Skip to content

[class], [dcl] Some "before" should refer to "happens-before" relationship in these clauses #928

Description

@xmh0511

Full name of submitter (unless configured in github; will be published with the issue): Jim X

For example, [class.cdtor] p1 says

For an object with a non-trivial constructor, referring to any non-static member or base class of the object before the constructor begins execution results in undefined behavior.

The wording "before" in this sentence should refer to "happens-before" such that the behavior is defined in the multithread context. This is true for "after". There are many such cases in the clause [class].

In clause [dcl], for example, [dcl.fct.def.coroutine] p14

The lifetime of parameter copies ends immediately after the lifetime of the coroutine promise object ends.

[dcl.init.ref] p2

A reference cannot be changed to refer to another object after initialization.

In addition, we seem to have never defined which evaluations are considered within the lifetime of an object in [basic.life].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions