Skip to content

Commit 48ad8ba

Browse files
committed
New issue from Jakub: meta::data_member_spec allows negative bit-field widths
1 parent 81d67f1 commit 48ad8ba

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

xml/issue4423.xml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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) &mdash;
30+
if `options.name` does not contain a value, then `options.bit_width`
31+
contains a value;
32+
</li>
33+
<li>(5.4) &mdash;
34+
if `options.bit_width` contains a value <i>V</i>, then
35+
<ul>
36+
<li>(5.4.1) &mdash;
37+
`is_integral_type(type) || is_enum_type(type)` is `true`,
38+
</li>
39+
<li>(5.4.2) &mdash;
40+
`options.alignment` does not contain a value,
41+
</li>
42+
<li>(5.4.3) &mdash;
43+
`options.no_unique_address` is `false`, <del>and</del>
44+
</li>
45+
<li><ins>(5.4.?) &mdash;
46+
<i>V</i> is not negative, and</ins>
47+
</li>
48+
<li>(5.4.4) &mdash;
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) &mdash;
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>

0 commit comments

Comments
 (0)