This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Immediate status.
define_aggregate members must be publicSection: 21.4.16 [meta.reflection.define.aggregate] Status: Immediate Submitter: Daniel Katz Opened: 2025-11-05 Last modified: 2025-11-05
Priority: Not Prioritized
View other active issues in [meta.reflection.define.aggregate].
View all other issues in [meta.reflection.define.aggregate].
View all issues with Immediate status.
Discussion:
The access of members of classes defined by injected declarations produced by evaluations of
std::meta::define_aggregate is unspecified.
[Kona 2025-11-05; approved by LWG. Status changed: New → Immediate.]
Proposed resolution:
This wording is relative to N5014.
Modify 21.4.16 [meta.reflection.define.aggregate] as indicated:
template<reflection_range R = initializer_list<info>> consteval info define_aggregate(info class_type, R&& mdescrs);-7- Let
-8- Constant When: […] -9- Effects: Produces an injected declarationCbe the class represented byclass_typeandrKbe theKth reflection value inmdescrs. […]D(7.7 [expr.const]) that definesCand has properties as follows:
- (9.1) — […]
- (9.2) — […]
- (9.3) — […]
- (9.4) — […]
- (9.5) — For each
rK, there is a corresponding entityMKwith public access belonging to the class scope ofDwith the following properties: […]- (9.6) — […]