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.

4429. meta::alignment_of should exclude data member description of bit-field

Section: 21.4.11 [meta.reflection.layout] Status: New Submitter: Tomasz Kamiński Opened: 2025-10-24 Last modified: 2025-10-27

Priority: Not Prioritized

View all issues with New status.

Discussion:

Addresses US 109-170

21.4.11 [meta.reflection.layout] p#8 This should similarly disallow data member descriptions of bit-fields.

[2025-10-24; Resolves US 109-170]

Proposed resolution:

This wording is relative to N5014.

  1. Modify 21.4.11 [meta.reflection.layout] as indicated:

    consteval size_t alignment_of(info r);	
    

    -7- Returns: […]

    -8- Throws: meta::exception unless all of the following conditions are met:

    • (8.1) — dealias(r) is a reflection of a type, object, variable of non-reference type, non-static data member that is not a bit-field, direct base class relationship, or data member description (T,N,A,W,NUA) (11.4.1 [class.mem.general]) where W is ⊥..
    • (8.2) — If dealias(r) represents a type, then is_complete_type(r) is true.