Title
`meta::has_identifier` is not specified for annotations
Status
wp
Section
[meta.reflection.names]
Submitter
Jakub Jelinek

Created on 2025-11-18.00:00:00 last changed yesterday

Messages

Date: 2026-03-31.16:35:58

Proposed resolution:

This wording is relative to N5032.

  1. Modify [meta.reflection.names] as indicated:

    consteval bool has_identifier(info r);
    -1- Returns:
    1. — [...]
    2. — Otherwise, if `r` represents a data member description (T,N,A,W,NUA) ([class.mem.general]); `true` if N is not ⊥. Otherwise, `false`.
    3. — Otherwise, `false`.
Date: 2026-03-31.16:35:58

[ Croydon 2026-03-28; Status changed: Immediate → WP. ]

Date: 2026-03-25.17:20:05

[ Croydon 2026-03-25; move to Immediate. ]

Date: 2026-03-25.17:05:36

[ Croydon 2026-03-25; LWG adds wording ]

Date: 2025-11-15.00:00:00

[ 2025-11-26; Reflector poll. ]

Set priority to 1 after reflector poll.

'value' and 'object' are missing too.

Date: 2025-11-18.00:00:00

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.

History
Date User Action Args
2026-03-31 16:35:58adminsetmessages: + msg16204
2026-03-31 16:35:58adminsetstatus: immediate -> wp
2026-03-25 17:20:05adminsetmessages: + msg16086
2026-03-25 17:20:05adminsetstatus: new -> immediate
2026-03-25 17:05:36adminsetmessages: + msg16085
2026-03-25 17:05:36adminsetmessages: + msg16084
2025-11-26 19:05:41adminsetmessages: + msg15762
2025-11-18 00:00:00admincreate