Title
`meta::data_member_spec` allows negative bit-field widths
Status
wp
Section
[meta.reflection.define.aggregate]
Submitter
Jakub Jelinek

Created on 2025-10-20.00:00:00 last changed 1 month ago

Messages

Date: 2025-11-11.10:48:16

Proposed resolution:

This wording is relative to N5014.

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

    • (5.3) — if `options.name` does not contain a value, then `options.bit_width` contains a value;
    • (5.4) — if `options.bit_width` contains a value V, then
      • (5.4.1) — `is_integral_type(type) || is_enum_type(type)` is `true`,
      • (5.4.2) — `options.alignment` does not contain a value,
      • (5.4.3) — `options.no_unique_address` is `false`, and
      • (5.4.?) — V is not negative, and
      • (5.4.4) — if V equals `0`, then `options.name` does not contain a value; and
    • (5.5) — if `options.alignment` contains a value, it is an alignment value ([basic.align]) not less than `alignment_of(type)`.
Date: 2025-11-11.10:48:16

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

Date: 2025-10-15.00:00:00

[ 2025-10-24; LWG telecon; Status changed: New → Ready. ]

Poll to move issue to Ready: 10/0/0

Date: 2025-10-20.00:00:00

The `meta::data_member_spec` function doesn't restrict `options.bit_width` to be non-negative.

History
Date User Action Args
2025-11-11 10:48:16adminsetmessages: + msg15659
2025-11-11 10:48:16adminsetstatus: voting -> wp
2025-10-30 17:45:31adminsetstatus: ready -> voting
2025-10-24 16:55:37adminsetmessages: + msg15414
2025-10-24 16:55:37adminsetstatus: new -> ready
2025-10-20 12:38:15adminsetmessages: + msg15268
2025-10-20 00:00:00admincreate