Skip to content

Commit 9275ba0

Browse files
committed
Provide less controversial P/R and add reference to new issue LWG 2591
1 parent 227ae52 commit 9275ba0

File tree

1 file changed

+84
-5
lines changed

1 file changed

+84
-5
lines changed

xml/issue2393.xml

Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ changed resolution: Currently the following program is accepted by three popular
130130
gcc 6 libstdc++, and clang 3.8.0 libc++:
131131
</p>
132132
<blockquote><pre>
133-
#include &lt;functional>
134-
#include &lt;iostream>
135-
#include &lt;typeinfo>
133+
#include &lt;functional&gt;
134+
#include &lt;iostream&gt;
135+
#include &lt;typeinfo&gt;
136136
#include "boost/function.hpp"
137137

138138
void foo(int) {}
@@ -244,9 +244,19 @@ pointer.
244244
<p>Discussion whether "tentatively ready" or "review". The latter would require one more meeting. EF: We already have implementation convergence. MC: I worry about a two-meeting delay. WEB: All that being said, I'd be slightly more confident with a review since we'll have new wording, but I wouldn't object. MC: We can look at it in a telecon and move it.</p>
245245
<p>STL reads out email to Daniel.</p>
246246
<p>Status Review, to be moved to TR at the next telecon.</p>
247-
</discussion>
248247

249-
<resolution>
248+
<note>2016-01-31, Daniel comments and suggests less controversive resolution</note>
249+
<p>
250+
It seems that specifically the wording changes for <sref ref="[func.wrap.func.targ]"/> p2 prevent this issue
251+
from making make progress. Therefore the separate issue LWG <iref ref="2591"/> has been created, that focuses
252+
solely on this aspect. Furtheron the current P/R of this issue has been adjusted to the minimal possible one,
253+
where the term "Callable" has been replaced by the new term "Lvalue-Callable".
254+
</p>
255+
256+
<p>
257+
<strong>Previous resolution II [SUPERSEDED]:</strong>
258+
</p>
259+
<blockquote class="note">
250260
<p>This wording is relative to N4527.</p>
251261

252262
<ol>
@@ -312,6 +322,75 @@ pointer.
312322
</blockquote>
313323
</li>
314324
</ol>
325+
</blockquote>
326+
</discussion>
327+
328+
<resolution>
329+
<p>This wording is relative to N4567.</p>
330+
331+
<ol>
332+
<li><p>Change <sref ref="[func.wrap.func]"/> p2 as indicated:</p>
333+
334+
<blockquote><p>
335+
-2- A callable <del>object <tt>f</tt> of</del> type <ins>(<sref ref="[func.def]"/>)</ins> <tt>F</tt> is <em><ins>Lvalue-</ins>Callable</em>
336+
for argument types <tt>ArgTypes</tt> and return type <tt>R</tt> if the expression <tt><i>INVOKE</i>(<del>f</del><ins>declval&lt;F&amp;&gt;()</ins>,
337+
declval&lt;ArgTypes&gt;()..., R)</tt>, considered as an unevaluated operand (Clause 5), is well formed (20.9.2).
338+
</p></blockquote>
339+
</li>
340+
341+
<li><p>Change <sref ref="[func.wrap.func.con]"/> p8+p21 as indicated:</p>
342+
343+
<blockquote>
344+
<pre>
345+
template&lt;class F&gt; function(F f);
346+
template &lt;class F, class A&gt; function(allocator_arg_t, const A&amp; a, F f);
347+
</pre>
348+
<blockquote>
349+
<p>
350+
[&hellip;]
351+
<p/>
352+
-8- <i>Remarks</i>: These constructors shall not participate in overload resolution unless <tt><del>f</del><ins>F</ins></tt> is
353+
<tt><ins>Lvalue-</ins>Callable</tt> (<sref ref="[func.wrap.func]"/>) for argument types <tt>ArgTypes...</tt> and return type <tt>R</tt>.
354+
</p>
355+
</blockquote>
356+
<p>
357+
[&hellip;]
358+
</p>
359+
<pre>
360+
template&lt;class F&gt; function&amp; operator=(F&amp;&amp; f);
361+
</pre>
362+
<blockquote>
363+
<p>
364+
[&hellip;]
365+
<p/>
366+
-21- <i>Remarks</i>: This assignment operator shall not participate in overload resolution unless
367+
<tt><del>declval&lt;typename decay&lt;F&gt;::type&amp;&gt;()</del><ins>decay_t&lt;F&gt;</ins></tt> is
368+
<tt><ins>Lvalue-</ins>Callable</tt> (<sref ref="[func.wrap.func]"/>) for argument types <tt>ArgTypes...</tt> and
369+
return type <tt>R</tt>.
370+
</p>
371+
</blockquote>
372+
373+
</blockquote>
374+
</li>
375+
376+
<li><p>Change <sref ref="[func.wrap.func.targ]"/> p2 as indicated:</p>
377+
378+
<blockquote><pre>
379+
template&lt;class T&gt; T* target() noexcept;
380+
template&lt;class T&gt; const T* target() const noexcept;
381+
</pre>
382+
<blockquote>
383+
<p>
384+
-2- <i>Requires</i>: <tt>T</tt> shall be a type that is <tt><ins>Lvalue-</ins>Callable</tt> (<sref ref="[func.wrap.func]"/>)
385+
for parameter types <tt>ArgTypes</tt> and return type <tt>R</tt>.
386+
<p/>
387+
-3- <i>Returns</i>: If <tt>target_type() == typeid(T)</tt> a pointer to the stored function target; otherwise a null
388+
pointer.
389+
</p>
390+
</blockquote>
391+
</blockquote>
392+
</li>
393+
</ol>
315394
</resolution>
316395

317396
</issue>

0 commit comments

Comments
 (0)