Skip to content

Commit 014da74

Browse files
committed
Additional updates
1 parent 3deb1a6 commit 014da74

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

xml/issue4483.xml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rejected.</p>
2222

2323
<p>Furthermore, `define_static_object` currently uses <tt>define_static_array(span(addressof(t), 1)).data()</tt>,
2424
for array types. Since for `T[N]` input this creates an multidimensional `T[1][N]` constant parameter
25-
object, this function does not support arrays at all. Furthermore creating a distinct template
25+
object, this function does not support arrays at all. Creating a distinct template
2626
parameter object leads to emission of (otherwise unnecessary) additional symbols, and breaks the
2727
invariant that for all supported object types <tt>&amp;constant_of(o) == define_static_object(o)</tt>.
2828
We should use `reflect_constant_array` for arrays directly.</p>
@@ -52,11 +52,11 @@ where <i>it<sub>i</sub></i> is an iterator to the <i>i<sup>th</sup></i> element
5252
</p>
5353
<p>-9- <i>Mandates</i>:
5454
<ul style="list-style-type: none">
55-
<li><ins>(9.1) &mdash;</ins> <tt>T</tt> is a structural type (<sref ref="[temp.param]"/>),
55+
<li><ins>(9.1) &mdash;</ins> <tt>T</tt> is a structural type (<sref ref="[temp.param]"/>),
5656
<del><tt>is_constructible_v&lt;T, ranges::range_reference_t&lt;R&gt;&gt;</tt> is `true`, and</del>
5757
</li>
5858
<li><ins>(9.2) &mdash;</ins> `T` satisfies `copy_constructible`<ins>, and</ins></li>
59-
<li><ins>(9.3) &mdash;</ins> if `U` does is not an array type, then <tt>is_constructible_v&lt;T, ranges::range_reference_t&lt;R&gt;&gt;</tt> is `true`.</li>
59+
<li><ins>(9.3) &mdash;</ins> if `U` is not an array type, then <tt>is_constructible_v&lt;T, ranges::range_reference_t&lt;R&gt;&gt;</tt> is `true`.</li>
6060
</ul>
6161
</p>
6262
<p>-10- Let `V` be the pack of values of type `info` of the same size as `r`,
@@ -68,19 +68,18 @@ where the <i>i<sup>th</sup></i> element is
6868
<ins>and <i>it<sub>i</sub></i> is an iterator to the <i>i<sup>th</sup></i> element of `r`</ins>.</p>
6969
<p>-11- Let <tt><i>P</i></tt> be
7070
<ul style="list-style-type: none">
71-
<li>(11.1) &mdash; If <tt>sizeof...(V) > 0</tt> is `true`, then the template parameter object (<sref ref="[temp.param]"/>) of type const `T[sizeof...(V)]`
71+
<li>(11.1) &mdash; If <tt>sizeof...(V) > 0</tt> is `true`, then the template parameter object (<sref ref="[temp.param]"/>) of type const `T[sizeof...(V)]`
7272
<del>initialized with `{[:V:]...}`</del><ins>, such that <tt>constant_of(<i>P</i>[<i>I</i>]) == V...[<i>I</i>]</tt> is `true`
7373
for all <tt><i>I</i></tt> in range [`0`, `sizeof...(V)`)</ins>.</li>
7474
<li>(11.2) &mdash; Otherwise, the template parameter object of type <tt>const array&lt;T, 0&gt;</tt> initialized with `{}`.</li>
7575
</ul></p>
7676
<p>-12- <i>Returns</i>: <tt>^^<i>P</i></tt>.</p>
77-
<p>-13- <i>Throws</i>: Any <ins>of</ins>
78-
<ul style="list-style-type: none">
79-
<li><ins>(10.1) &mdash; exception thrown by increment and dereference operations on iterator to `r` and comparison of such iterator to sentinel,</ins></li>
80-
<li><ins>(10.2) &mdash;</ins> exception thrown by the evaluation of any <ins>argument of reflect_constant</ins><del><i>e<sub>i</sub></i></del>, or</li>
81-
<li><ins>(10.3) &mdash;</ins> `meta::exception` if evaluation of any <del><tt>reflect_constant(<i>e<sub>i</sub></i>)</tt></del><ins>evaluation of
82-
<tt>reflect_constant</tt> or <tt>reflect_constant_array</tt></ins> would exit via an exception.</li>
83-
</ul></p>
77+
<p>-13- <i>Throws</i>:
78+
<ins>Any exception thrown by increment and dereference operations on iterator to `r` and comparison of such iterator to sentinel.</ins>
79+
Any exception thrown by the evaluation of any <ins>argument of `reflect_constant`.</ins><del><i>e<sub>i</sub></i>, or</del>
80+
`meta::exception` if evaluation of any <del><tt>reflect_constant(<i>e<sub>i</sub></i>)</tt></del><ins>evaluation of
81+
<tt>reflect_constant</tt> or <tt>reflect_constant_array</tt></ins> would exit via an exception.
82+
</p>
8483
</blockquote>
8584
[&hellip;]
8685

@@ -95,7 +94,7 @@ using U = remove_cvref_t&lt;T&gt;;
9594
if constexpr (meta::is_class_type(^^U)) {
9695
return addressof(meta::extract&lt;const U&amp;&gt;(meta::reflect_constant(std::forward&lt;T&gt;(t))));
9796
<ins>} else if constexpr (meta::is_array_type(^^U)) {
98-
return addressof(meta::extract&lt;const U&amp;&gt;(meta::reflect_constant_array(std::forward&lt;T&gt;(t))));</ins>
97+
return addressof(meta::extract&lt;const U&amp;&gt;(meta::reflect_constant_array(std::forward&lt;T&gt;(t))));</ins>
9998
} else {
10099
return define_static_array(span(addressof(t), 1)).data();
101100
}

0 commit comments

Comments
 (0)