Skip to content

Commit 4ebe8b3

Browse files
committed
New issue from Jakub: meta::define_aggregate should require a class type
1 parent 48ad8ba commit 4ebe8b3

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

xml/issue4424.xml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4424" status="New">
5+
<title>`meta::define_aggregate` should require a class type</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::define_aggregate` function doesn't say what happens if <i>C</i>
14+
does not represent a class type. It's also unclear whether it should work
15+
with aliases to class types, e.g.
16+
<pre>struct S; using A = S; ... meta::define_aggregate(^^A, {});</pre>
17+
</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+
<blockquote>
30+
<p>-7-
31+
Let <i>C</i> be the class represented by
32+
<code><ins>dealias(</ins>class_type<ins>)</ins></code>
33+
and <i>r<sub>K</sub></i> be the <i>K</i><sup>th</sup> reflection value
34+
in `mdescrs`.
35+
For every <i>r<sub>K</sub></i> in `mdescrs`,
36+
let (<i>T<sub>K</sub></i>, <i>N<sub>K</sub></i>, <i>A<sub>K</sub></i>,
37+
<i>W<sub>K</sub></i>, <i>NUA<sub>K</sub></i>)
38+
be the corresponding data member description represented by
39+
<i>r<sub>K</sub></i>.
40+
</p>
41+
<p>-8- <i>Constant when</i>:
42+
<ul>
43+
<li><ins>(8.?) &mdash;
44+
`dealias(class_type)` represents a class type;
45+
</ins>
46+
</li>
47+
<li>(8.1) &mdash;
48+
<i>C</i> is incomplete from every point in the evaluation context;
49+
</li>
50+
</ul>
51+
</p>
52+
</blockquote>
53+
</li>
54+
</ol>
55+
</resolution>
56+
57+
</issue>

0 commit comments

Comments
 (0)