Skip to content

Commit cf97c2f

Browse files
tomaszkamjwakely
authored andcommitted
New issue to address US 120-181 and US 121-182: Clarify element initialization for meta::reflect_constant_array
1 parent c52f943 commit cf97c2f

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

xml/issue4432.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="4432" status="New">
5+
<title>Clarify element initialization for <tt>meta::reflect_constant_array</tt></title>
6+
<section>
7+
<sref ref="[meta.reflection.array]"/>
8+
</section>
9+
<submitter>Tomasz Kamiński</submitter>
10+
<date>27 Oct 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<b>Addresses US 120-181 and US 121-182</b>
15+
<p>
16+
<sref ref="[meta.reflection.array]"/> p10 Clarify <i>e<sub>i</sub></i> type.
17+
It is not clear what <i>e<sub>i</sub></i> is when proxy references are involved.
18+
</p>
19+
<p>
20+
<sref ref="[meta.reflection.array]"/> Clarify copy-initialization vs. direct-initialization use
21+
The initialization of <tt>P</tt> uses copy-initialization but the Mandates clause uses direct-initialization.
22+
</p>
23+
</discussion>
24+
25+
<resolution>
26+
<p>
27+
This wording is relative to <paper num="N5014"/>.
28+
</p>
29+
30+
<ol>
31+
32+
<li><p>Modify <sref ref="[meta.reflection.array]"/> as indicated:</p>
33+
34+
<pre>
35+
template&lt;ranges::input_range R&gt;
36+
consteval info reflect_constant_array(R&amp;&amp; r);
37+
</pre>
38+
<blockquote>
39+
<p>-8- Let <tt>T</tt> be <tt>ranges::range_value_t&lt;R&gt;</tt>.</p>
40+
<p>-9- <i>Mandates</i>:
41+
<tt>T</tt> is a structural type (<sref ref="[temp.param]"/>),
42+
<tt>is_constructible_v&lt;T, ranges::range_reference_t&lt;R&gt;&gt;</tt> is <tt>true</tt>, and
43+
<del><tt>is_copy_constructible_v&lt;T&gt;</tt> is <tt>true</tt></del>
44+
<ins><tt>T</tt> statisfies <tt>copy_constructible</tt></ins>.</p>
45+
<p>-10- Let <tt>V</tt> be the pack of values of type info of the same size as <tt>r</tt>,
46+
where the <i>i<sup>th</sup></i> element is
47+
<tt>reflect_constant(<del><i>e<sub>i</sub></i></del><ins>static_cast&lt;T&gt;(*<i>it<sub>i</sub></i>)</ins>)</tt>,
48+
where <i><del>e<sub>i</sub></del><ins>it<sub>i</sub></ins></i> is <ins>an iterator to</ins> the ith element of <tt>r</tt>.
49+
</p>
50+
<p>[&hellip;]</p>
51+
</blockquote>
52+
</li>
53+
</ol>
54+
55+
</resolution>
56+
57+
</issue>

0 commit comments

Comments
 (0)