This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-10-24
A class that contains only std::meta::info data members, or arrays thereof, should be const-default-constructible.
Proposed resolution (approved by CWG 2025-10-24):
Change in 9.5.1 [dcl.init.general] paragraph 8 as follows (add bullets):
Aclasstype cv T is const-default-constructible ifIf a program calls for the default-initialization of an object of a const-qualified type T, T shall be
- T is std::meta::info;
- T is std::nullptr_t;
- default-initialization of T would invoke a user-provided constructor of T (not inherited from a base class);
or ifT is a class type where
- each direct non-variant non-static data member
Mof T has a default member initializer or, if Mis ofclass type X (or array thereof), X isconst-default-constructible type,- if T is a union with at least one non-static data member, exactly one variant member has a default member initializer,
- if T is not a union,
forthe type of each anonymous union member is const-default-constructiblewith at least one non-static data member (if any), exactly one non-static data member has a default member initializer, and- each potentially constructed base class of T is const-default-constructible
.; or- T is an array of const-default-constructible type.
std::meta::info ora const-default-constructibleclasstype, or array thereof.