File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed
Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =' 1.0' encoding =' utf-8' standalone =' no' ?>
2+ <!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+ <issue num =" 4423" status =" New" >
5+ <title >`meta::data_member_spec` allows negative bit-field widths</title >
6+ <section ><sref ref =" [meta.reflection.define.aggregate]" /></section >
7+ <submitter >Jakub Jelinek</submitter >
8+ <date >20 Oct 2025</date >
9+ <priority >99</priority >
10+
11+ <discussion >
12+ <p >
13+ The `meta::data_member_spec` function doesn't restrict `options.bit_width`
14+ to be non-negative.
15+ </p >
16+ </discussion >
17+
18+ <resolution >
19+ <p >
20+ This wording is relative to <paper num =" N5014" />.
21+ </p >
22+
23+ <ol >
24+
25+ <li ><p >Modify <sref ref =" [meta.reflection.define.aggregate]" /> as indicated:</p >
26+
27+ <blockquote >
28+ <ul >
29+ <li >(5.3) —
30+ if `options.name` does not contain a value, then `options.bit_width`
31+ contains a value;
32+ </li >
33+ <li >(5.4) —
34+ if `options.bit_width` contains a value <i >V</i >, then
35+ <ul >
36+ <li >(5.4.1) —
37+ `is_integral_type(type) || is_enum_type(type)` is `true`,
38+ </li >
39+ <li >(5.4.2) —
40+ `options.alignment` does not contain a value,
41+ </li >
42+ <li >(5.4.3) —
43+ `options.no_unique_address` is `false`, <del >and</del >
44+ </li >
45+ <li ><ins >(5.4.?) —
46+ <i >V</i > is not negative, and</ins >
47+ </li >
48+ <li >(5.4.4) —
49+ if <i >V</i > equals `0`, then `options.name` does not contain a value; and
50+ </li >
51+ </ul >
52+ </li >
53+ <li >(5.5) —
54+ if `options.alignment` contains a value, it is an alignment value
55+ (<sref ref =" [basic.align]" />) not less than `alignment_of(type)`.
56+ </li >
57+ </ul >
58+ </blockquote >
59+ </li >
60+ </ol >
61+ </resolution >
62+
63+ </issue >
You can’t perform that action at this time.
0 commit comments