Skip to content

Commit c8882dc

Browse files
committed
Move to 2746 to Ready (with simpler resolution)
1 parent 78bafcf commit c8882dc

File tree

1 file changed

+50
-5
lines changed

1 file changed

+50
-5
lines changed

xml/issue2746.xml

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version='1.0' encoding='utf-8' standalone='no'?>
22
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
33

4-
<issue num="2746" status="New">
4+
<issue num="2746" status="Ready">
55
<title>Inconsistency between requirements for <tt>emplace</tt> between <tt>optional</tt> and <tt>variant</tt></title>
66
<section><sref ref="[optional.assign]"/><sref ref="[variant.mod]"/><sref ref="[any.modifiers]"/></section>
77
<submitter>Richard Smith</submitter>
@@ -117,9 +117,7 @@ precondition violation, I recommend that its <tt>emplace</tt> functions use the
117117
them also in consistency with their corresponding type-based <tt>emplace</tt> forms that are
118118
<i>Mandates:</i>-free but delegate to the index-based forms.
119119
</p>
120-
</discussion>
121-
122-
<resolution>
120+
<superseded>
123121
<p>This wording is relative to <a href="https://wg21.link/n4861">N4861</a>.</p>
124122

125123
<ol>
@@ -205,6 +203,53 @@ template&lt;size_t I, class U, class... Args&gt;
205203
</blockquote>
206204
</li>
207205

208-
</ol></resolution>
206+
</ol>
207+
208+
</superseded>
209+
210+
<note>2025-12-05; Jonathan provides new wording</note>
211+
<p>
212+
There's no need to use SFINAE to check if a `variant` with N alternatives
213+
allows you to emplace the N+1<sup>th</sup> alternative.
214+
</p>
215+
216+
<note>2025-12-05; LWG telecon. Moved to Ready</note>
217+
218+
</discussion>
219+
220+
<resolution>
221+
222+
<p>This wording is relative to <paper num="N5014"/>.</p>
223+
224+
<ol>
225+
<li><p>Modify <sref ref="[optional.assign]"/>, as indicated:</p>
226+
227+
<blockquote>
228+
<pre>
229+
template&lt;class... Args&gt; T&amp; emplace(Args&amp;&amp;... args);
230+
</pre>
231+
<blockquote>
232+
<p>
233+
-29- <i><del>Mandates</del><ins>Constraints</ins>:</i> <tt>is_constructible_v&lt;T, Args...&gt;</tt> is <tt>true</tt>.
234+
<p/>
235+
[&hellip;]
236+
</p>
237+
</blockquote>
238+
<pre>
239+
template&lt;class U, class... Args&gt; T&amp; emplace(initializer_list&lt;U&gt; il, Args&amp;&amp;... args);
240+
</pre>
241+
<blockquote>
242+
<p>
243+
-35- <i>Constraints:</i> <tt>is_constructible_v&lt;T, initializer_list&lt;U&gt;&amp;, Args...&gt;</tt> is <tt>true</tt>.
244+
<p/>
245+
[&hellip;]
246+
</p>
247+
</blockquote>
248+
</blockquote>
249+
</li>
250+
251+
</ol>
252+
253+
</resolution>
209254

210255
</issue>

0 commit comments

Comments
 (0)