Skip to content

Commit 6ef2b81

Browse files
committed
New issue to address US 109-170: meta::alignment_of should exclude data member description of bit-field
1 parent 3f5c31a commit 6ef2b81

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

xml/issue4429.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4429" status="New">
5+
<title><code>meta::alignment_of</code> should exclude data member description of bit-field</title>
6+
<section>
7+
<sref ref="[meta.reflection.layout]"/>
8+
</section>
9+
<submitter>Tomasz Kamiński</submitter>
10+
<date>24 Oct 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<b>Addresses US 109-170</b>
15+
<p>
16+
<sref ref="[meta.reflection.layout]"/> p#8
17+
This should similarly disallow data member descriptions of bit-fields.
18+
</p>
19+
</discussion>
20+
21+
<resolution>
22+
<p>
23+
This wording is relative to <paper num="N5014"/>.
24+
</p>
25+
26+
<ol>
27+
28+
<li><p>Modify <sref ref="[meta.reflection.layout]"/> as indicated:</p>
29+
30+
<pre>
31+
consteval size_t alignment_of(info r);
32+
</pre>
33+
<blockquote>
34+
<p>-7- <i>Returns</i>: [&hellip;]
35+
</p>
36+
<p>-8- <i>Throws</i>: `meta::exception` unless all of the following conditions are met:
37+
<ul>
38+
<li>(8.1) &mdash;
39+
`dealias(r)` is a reflection of a type, object, variable of non-reference type,
40+
non-static data member that is not a bit-field, direct base class relationship,
41+
or data member description <ins><i>(T,N,A,W,NUA)</i> (<sref ref="[class.mem.general]"/>)
42+
where <i>W</i> is not ⊥.</ins>.
43+
</li>
44+
<li>(8.2) &mdash;
45+
If `dealias(r)` represents a type, then `is_complete_type(r)` is true.
46+
</li>
47+
</ul>
48+
</p>
49+
</blockquote>
50+
</li>
51+
</ol>
52+
53+
</resolution>
54+
55+
</issue>

0 commit comments

Comments
 (0)