Skip to content

CWG2993 [dcl.fct.def.general] Informal references to the "body" of a destructor #672

Description

@hubert-reinterpretcast

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

Reference (section label): dcl.fct.def.general

Link to reflector thread (if any): N/A

Issue description:
https://wg21.link/dcl.fct.def.general#1 explains that various actions performed by constructors without syntactically being present are considered part of the body of the constructor. No similar statement is made with respect to destructors.

Suggested resolution:
Any informal reference to the body of a function should be interpreted as a reference to the non-terminal function-body, including, for. For a constructor this includes, default member initializers or default initialization used to initialize a base or member subobject in the absence of a mem-initializer-id ([class.base.init]). Similarly, for a destructor, this includes any calling of destructors of members and bases by the destructor ([class.dtor]).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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