This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.
meta::define_aggregate should require a class typeSection: 21.4.16 [meta.reflection.define.aggregate] Status: WP Submitter: Jakub Jelinek Opened: 2025-10-20 Last modified: 2025-11-11
Priority: 1
View all other issues in [meta.reflection.define.aggregate].
View all issues with WP status.
Discussion:
Addresses US 125-188
The meta::define_aggregate function doesn't say what happens if C
does not represent a class type.
It's also unclear whether it should work with aliases to class types, e.g.
struct S; using A = S; ... meta::define_aggregate(^^A, {});
And what happens if you try to define a cv-qualified type:
struct S; meta::define_aggregate(^^const S, {});
Should this be an error, or inject a definition of the unqualified type?
[2025-10-23; Reflector poll.]
Set priority to 1 after reflector poll.
[Kona 2025-11-03; approved by LWG. Status changed: New → Immediate.]
Previous resolution [SUPERSEDED]:
This wording is relative to N5014.
Modify 21.4.16 [meta.reflection.define.aggregate] as indicated:
-7- Let C be the class represented by
dealias(class_type)and rK be the Kth reflection value inmdescrs. For every rK inmdescrs, let (TK, NK, AK, WK, NUAK) be the corresponding data member description represented by rK.-8- Constant when:
- (8.?) —
dealias(class_type)represents a class type;- (8.1) — C is incomplete from every point in the evaluation context;
[2025-10-24; LWG telecon. Jonathan updates wording]
Make a minimal change for now, can add support for aliases later.
[Kona 2025-11-08; Status changed: Immediate → WP.]
Proposed resolution:
This wording is relative to N5014.
Modify 21.4.16 [meta.reflection.define.aggregate] as indicated:
-7- Let C be the
classtype represented byclass_typeand rK be the Kth reflection value inmdescrs. For every rK inmdescrs, let (TK, NK, AK, WK, NUAK) be the corresponding data member description represented by rK.-8- Constant when:
- (8.?) —
class_typerepresents a cv-unqualified class type;- (8.1) — C is incomplete from every point in the evaluation context;