Created on 2025-10-01.00:00:00 last changed 1 week ago
A class that contains only std::meta::info data members, or arrays thereof, should be const-default-constructible.
Possible resolution:
Change in 9.5.1 [dcl.init.general] paragraph 8 as follows (add bullets):
Aclasstype 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
- default-initialization of T would invoke a user-provided constructor of T (not inherited from a base class);
- T is std::meta::info;
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 memberhas 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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2025-10-01 00:00:00 | admin | create |