Skip to content

[basic.life][class.dtor] Seemingly redundant normative specification for undefined behavior about double destruction #6374

Open
@frederick-vs-ja

Description

@frederick-vs-ja

[basic.life]/9 and [class.dtor]/18 seem to be normatively redundant, because

  • [basic.life]/1.4 already specifies that a destructor call ends the lifetime of a class object, and
  • [basic.life]/6.2 and [basic.life]/7.2 already specifies that calling a non-static member function, including destructor, for an out-of-lifetime object is undefined behavior.

Originally discovered by @sergey-anisimov-dev in cplusplus/CWG#361 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions