Skip to content

Commit 44ebbdb

Browse files
tomaszkamjwakely
authored andcommitted
New issue for US 127-190: Clean up identifier comparisons in meta::define_aggregate
1 parent e349854 commit 44ebbdb

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

xml/issue4443.xml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4443" status="New">
5+
<title>Clean up identifier comparisons in `meta::define_aggregate`</title>
6+
<section>
7+
<sref ref="[meta.reflection.define.aggregate]"/>
8+
</section>
9+
<submitter>Tomasz Kamiński</submitter>
10+
<date>04 Nov 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<b>Addresses <a href="https://github.com/cplusplus/nbballot/issues/759">US 127-190</a></b>
15+
<p><i>N<sub>K</sub></i> is defined as an identifier (see 11.4.1) and should not be compared with
16+
code or with string literals in bullet 8.4. Similarly, 9.5.1 should not talk about
17+
“character sequence encoded by <i>N<sub>K</sub></i>”</p>
18+
</discussion>
19+
20+
<resolution>
21+
<p>
22+
This wording is relative to <paper num="N5014"/>.
23+
</p>
24+
25+
<ol>
26+
27+
<li><p>Modify <sref ref="[meta.reflection.define.aggregate]"/> as indicated:</p>
28+
29+
<pre>
30+
template&lt;reflection_range R = initializer_list&lt;info&gt;&gt;
31+
consteval info define_aggregate(info class_type, R&amp;&amp; mdescrs);
32+
</pre>
33+
<blockquote>
34+
<p>-7- [&hellip;]</p>
35+
<p>-8- <i>Constant When</i>:<ul>
36+
<li>-8.1- [&hellip;]</li>
37+
<li>-8.2- [&hellip;]</li>
38+
<li>-8.3- [&hellip;]</li>
39+
<li>-8.4- for every pair (<i>r<sub>K</sub></i>, <i>r<sub>L</sub></i>) where
40+
<i>K&lt;L</i>, if <i>N<sub>K</sub></i> is not ⊥ and N<sub>L</sub> is not ⊥, then either:
41+
<ul>
42+
<li>-8.4.1- <del><i>N<sub>K</sub></i><tt> != </tt><i>N<sub>L</sub></i> is `true`</del>
43+
<ins><i>N<sub>K</sub></i> is not the same identifier as <i>N<sub>L</sub></i></ins> or</li>
44+
<li>-8.4.2- <del><i>N<sub>K</sub></i><tt> == u8"_" </tt> is `true`</del>
45+
<ins><i>N<sub>K</sub></i> is the identifier `_`</ins></li>
46+
</ul></li>
47+
</ul></p>
48+
<p>-9- <i>Effects</i>: Produces an injected declaration <ins>D</ins> (<sref ref="[expr.const]"/>)
49+
that defines <i>C</i> and has properties as follows: <ul>
50+
<li>-9.1- [&hellip;]</li>
51+
<li>-9.2- [&hellip;]</li>
52+
<li>-9.3- [&hellip;]</li>
53+
<li>-9.4- [&hellip;]</li>
54+
<li>-9.5- for every <i>r<sub>K</sub></i>, there is corresponding entity <i>M<sub>K</sub></i>
55+
belonging to the class scope of <i>D</i> with the following properties:
56+
<i>K&lt;L</i>, if <i>N<sub>K</sub></i> is not ⊥ and N<sub>L</sub> is not ⊥, then either:
57+
<ul>
58+
<li>-9.5.1- if <i>N<sub>K</sub></i> is ⊥, <i>M<sub>K</sub></i> is an unnamed bit-field.
59+
Otherwise, <i>M<sub>K</sub></i> is a non-static data member whose name is the identifier
60+
<del>determined by the character sequence encoded by</del> <i>N<sub>K</sub></i><del> in UTF-8</del>.</li>
61+
<li>-9.5.2- [&hellip;]</li>
62+
<li>-9.5.3- [&hellip;]</li>
63+
<li>-9.5.4- [&hellip;]</li>
64+
<li>-9.5.5- [&hellip;]</li>
65+
</ul></li>
66+
<li>-9.6- [&hellip;]</li>
67+
</ul></p>
68+
</blockquote>
69+
70+
</li>
71+
72+
</ol>
73+
74+
</resolution>
75+
76+
</issue>

0 commit comments

Comments
 (0)