This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 108h. See for the official list.


2394. Const-default-constructible for members

Section:  [class.default.ctor]     Status: CD5     Submitter: Richard Smith     Date: 2018-07-10

[Accepted as a DR at the February, 2019 meeting.]

After the changes for comment RU 1 in P0490R0, a defaulted default constructor is acceptable for default initialization of a const object under certain circumstances; for example,

   struct A {};
   const A a;

is well-formed. However, default-initialization of such a class member still requires a user-provided constructor:

   struct B { const A a; };
   B b;   //error

Proposed resolution (November, 2018):

Change [class.default.ctor] bullet 2.4 as follows:

A defaulted default constructor for class X is defined as deleted if: