Created on 2025-10-01.00:00:00 last changed 1 month ago
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.
A class that contains only std::meta::info data members, or arrays thereof, should be const-default-constructible.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2025-11-06 23:04:52 | admin | set | status: tentatively ready -> ready |
| 2025-10-24 22:41:53 | admin | set | messages: + msg8175 |
| 2025-10-24 22:41:53 | admin | set | status: open -> tentatively ready |
| 2025-10-01 00:00:00 | admin | create | |