Title
Clean up identifier comparisons in `meta::define_aggregate`
Status
wp
Section
[meta.reflection.define.aggregate]
Submitter
Tomasz Kamiński

Created on 2025-11-04.00:00:00 last changed 1 month ago

Messages

Date: 2025-11-11.10:48:55

Proposed resolution:

This wording is relative to N5014.

  1. Modify [meta.reflection.define.aggregate] as indicated:

    template<reflection_range R = initializer_list<info>>
      consteval info define_aggregate(info class_type, R&& mdescrs);
    

    -7- […]

    -8- Constant When:

    • -8.1- […]
    • -8.2- […]
    • -8.3- […]
    • -8.4- for every pair (rK, rL) where K<L, if NK is not ⊥ and NL is not ⊥, then either:
      • -8.4.1- NK != NL is `true` NK is not the same identifier as NL or
      • -8.4.2- NK == u8"_" is `true` NK is the identifier `_` (u+005f low line).

    -9- Effects: Produces an injected declaration D ([expr.const]) that defines C and has properties as follows:

    • -9.1- […]
    • -9.2- […]
    • -9.3- […]
    • -9.4- […]
    • -9.5- for every rK, there is corresponding entity MK belonging to the class scope of D with the following properties: K<L, if NK is not ⊥ and NL is not ⊥, then either:
      • -9.5.1- if NK is ⊥, MK is an unnamed bit-field. Otherwise, MK is a non-static data member whose name is the identifier determined by the character sequence encoded by NK in UTF-8.
      • -9.5.2- […]
      • -9.5.3- […]
      • -9.5.4- […]
      • -9.5.5- […]
    • -9.6- […]

Date: 2025-11-11.10:48:55

[ Kona 2025-11-08; Status changed: Immediate → WP. ]

Date: 2025-11-04.20:42:42

[ Kona 2025-11-04; approved by LWG. Status changed: New → Immediate. ]

Date: 2025-11-04.00:00:00
Addresses US 127-190

NK is defined as an identifier (see 11.4.1) and should not be compared with code or with string literals in bullet 8.4. Similarly, 9.5.1 should not talk about “character sequence encoded by NK

History
Date User Action Args
2025-11-11 10:48:55adminsetmessages: + msg15696
2025-11-11 10:48:55adminsetstatus: immediate -> wp
2025-11-04 20:42:42adminsetmessages: + msg15502
2025-11-04 20:42:42adminsetstatus: new -> immediate
2025-11-04 19:36:20adminsetmessages: + msg15498
2025-11-04 00:00:00admincreate