This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
is_enumerable_type: Definition of "enumerable type" looks strangeSection: 21.4.7 [meta.reflection.queries] Status: New Submitter: S. B. Tam Opened: 2026-05-18 Last modified: 2026-05-24
Priority: Not Prioritized
View other active issues in [meta.reflection.queries].
View all other issues in [meta.reflection.queries].
View all issues with New status.
Discussion:
21.4.7 [meta.reflection.queries] p30 says:
-30- A type
Tis enumerable from a pointPif either
(30.1) —
Tis a class type complete at pointPor(30.2) —
Tis an enumeration type defined by a declarationDsuch thatDis reachable fromPbutPdoes not occur within an enum-specifier ofD(9.8.1 [dcl.enum]).
The second bullet looks strange to a language lawyer: an enum type can only be declared by
opaque-enum-declarations and enum-specifiers (9.8.1 [dcl.enum]), and
only the latter are definitions (6.2 [basic.def] p2). That is, D
must be an enum-specifier. What does it mean to say "an enum-specifier of an
enum-specifier"?
D", the second bullet
could simply refer to D as an enum-specifier.
Proposed resolution:
This wording is relative to N5046.
Modify 21.4.7 [meta.reflection.queries] as indicated:
consteval bool is_enumerable_type(info r);-30- A type
Tis enumerable from a pointPif either
(30.1) —
Tis a class type complete at pointPor(30.2) —
Tis an enumeration type defined bya declarationan enum-specifierD(9.8.1 [dcl.enum]) such thatDis reachable fromPbut.Pdoes not occur within an enum-specifier ofD(9.8.1 [dcl.enum])