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.
meta::has_identifier is not specified for annotationsSection: 21.4.6 [meta.reflection.names] Status: Immediate Submitter: Jakub Jelinek Opened: 2025-11-18 Last modified: 2026-03-25
Priority: 1
View all other issues in [meta.reflection.names].
View all issues with Immediate status.
Discussion:
The std::meta::has_identifier metafunction doesn't say what it returns
for an annotation. An annotation is not an entity, so it's not an unnamed
entity, and it's also not a type, type alias, function, or any of the other
things in the list.
We should add an item to the list for annotations, or just add a catch-all "Otherwise false" to the end of the list.
[2025-11-26; Reflector poll.]
Set priority to 1 after reflector poll.
'value' and 'object' are missing too.
[Croydon 2026-03-25; LWG adds wording]
[Croydon 2026-03-25; move to Immediate.]
Proposed resolution:
This wording is relative to N5032.
Modify 21.4.6 [meta.reflection.names] as indicated:
consteval bool has_identifier(info r);-1- Returns:
- — [...]
- — Otherwise, if
rrepresents a data member description (T,N,A,W,NUA) (11.4.1 [class.mem.general]);trueif N is not ⊥. Otherwise,false.- — Otherwise,
false.