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]).
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]).