Skip to content

Commit 8922a21

Browse files
committed
Editorial improvements
Fixes typos and uses preferred XML text elements
1 parent dbe37a4 commit 8922a21

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

xml/issue4255.xml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,32 @@
1212
<p>
1313
The standard currently requires that constructing <code>move_only_function</code>
1414
from empty <code>copyable_function</code>, creates an non-empty <code>move_only_function</code>,
15-
that contains an empty <code>copyable_function</code> as the target. For exampe:
16-
<code>
15+
that contains an empty <code>copyable_function</code> as the target. For example:
16+
</p>
17+
<blockquote><pre>
1718
std::copyable_function&lt;int(int)&gt; ce;
1819
std::move_only_function&lt;int(int)&gt; me(ce);
19-
</code>
20+
</pre></blockquote>
21+
<p>
2022
We require that invoking <code>me(1)</code> is undefined behavior (as it leads to call to the
2123
<code>ce(1)</code>), however it cannot be detected in the user code, as <code>me != nullptr</code>
2224
is true.
2325
</p>
24-
2526
<p>
26-
We should require that the <code>move_only_function(F&amp;&amp; f)</code> constructor to create an
27-
empty object, if <code>f</code> is instantiation of of <code>copyable_function</code> and
28-
<code>f == nullptr</code> is true, i.e. f does not contain target object.
27+
We should require the <code>move_only_function(F&amp;&amp; f)</code> constructor to create an
28+
empty object, if <code>f</code> is an instantiation of <code>copyable_function</code> and
29+
<code>f == nullptr</code> is true, i.e. `f` does not contain target object.
2930
</p>
30-
3131
<p>
3232
This simplifies implementing avoidance of double wrapping per <sref ref="[func.wrap.general]"/> p2,
33-
as transfering the target produces empty functor.
33+
as transferring the target produces an empty functor.
3434
</p>
35-
3635
<p>
3736
The <code>copyable_function</code> cannot be constructed from <code>move_only_function</code>,
38-
as it requires functor to be copyable. Invkoing an empty <code>std::function</code> has well
37+
as it requires functor to be copyable. Invoking an empty <code>std::function</code> has well
3938
defined behavior (throws <code>bad_function_call</code>), and wrapping such object into
40-
other functors should reproduce that behavior
39+
other functors should reproduce that behavior.
4140
</p>
42-
4341
</discussion>
4442

4543
<resolution>
@@ -56,13 +54,15 @@ template&lt;class F&gt; move_only_function(F&amp;&amp; f);
5654
</pre>
5755
<blockquote>
5856
[&hellip;]
59-
<p>-8- <i>Postconditions:</i>: <tt>*this</tt> has no target object if any of the following hold:</p>
60-
<ul>
61-
<li><p>(8.1) <tt>f</tt> is a null function pointer value, <del>or</del></p></li>
62-
<li><p>(8.2) <tt>f</tt> is a null member pointer value, or</p></li>
63-
<li><p>(8.2) <tt>remove_cvref_t&lt;F&gt;</tt> is a specialization of the <tt>move_only_function</tt>
64-
<ins>or <tt>copyable_function</tt></ins> class template, and <tt>f</tt> has no target object.</p></li>
65-
</ul>
57+
<p>
58+
-8- <i>Postconditions:</i>: <tt>*this</tt> has no target object if any of the following hold:
59+
</p>
60+
<ol style="list-style-type: none">
61+
<li><p>(8.1) &mdash; <tt>f</tt> is a null function pointer value, <del>or</del></p></li>
62+
<li><p>(8.2) &mdash; <tt>f</tt> is a null member pointer value, or</p></li>
63+
<li><p>(8.2) &mdash; <tt>remove_cvref_t&lt;F&gt;</tt> is a specialization of the <tt>move_only_function</tt>
64+
<ins>or <tt>copyable_function</tt></ins> class template, and <tt>f</tt> has no target object.</p></li>
65+
</ol>
6666
</blockquote>
6767
</blockquote>
6868

xml/issue4256.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ struct M
2020
</pre>
2121
<p>
2222
The constructor of <code>function_ref&lt;void()&gt;</code> from <code>nontype_t</code>
23-
is considered to be valid candidate
24-
(is_constructible_v&lt;function_ref&lt;void()&gt;, nontype_t&lt;M{}&gt;&gt; is <code>true</code>),
25-
despite the fact that the corresponding invocation of template argument object, that is const lvalue,
26-
is ill-formed. As consequence we produce hard error from inside of this constructor.
23+
is considered to be valid candidate
24+
(<code>is_constructible_v&lt;function_ref&lt;void()&gt;, nontype_t&lt;M{}&gt;&gt;</code>
25+
is <code>true</code>), despite the fact that the corresponding invocation of template
26+
argument object, that is const lvalue, is ill-formed. As consequence we produce a hard
27+
error from inside of this constructor.
2728
</p>
28-
2929
<p>
3030
This is caused by the fact that for constructors with non-type <code>auto f</code> parameter,
3131
we are checking if <code><i>is-invocable-using</i>&lt;F&gt;</code> is <code>true</code>,
@@ -59,10 +59,10 @@ template&lt;auto f, class U&gt; constexpr function_ref(nontype_t&lt;f&gt;, U&amp
5959
<blockquote>
6060
<p>-12- Let <tt>T</tt> be <tt>remove_reference_t&lt;U&gt;</tt> and <tt>F</tt> be <tt>decltype(f)</tt>.</p>
6161
<p>-13- <i>Constraints:</i>:</p>
62-
<ul>
63-
<li><p>(13.1) <tt>is_rvalue_reference_v&lt;U&amp;&amp;&gt;</tt> is false, and</p></li>
64-
<li><p>(13.2) <tt><i>is-invocable-using</i>&lt;<ins>const </ins>F<ins>&amp;</ins>, T <i>cv</i>&amp;&gt;</tt> is <tt>true</tt>.</p></li>
65-
</ul>
62+
<ol style="list-style-type: none">
63+
<li><p>(13.1) &mdash; <tt>is_rvalue_reference_v&lt;U&amp;&amp;&gt;</tt> is false, and</p></li>
64+
<li><p>(13.2) &mdash; <tt><i>is-invocable-using</i>&lt;<ins>const </ins>F<ins>&amp;</ins>, T <i>cv</i>&amp;&gt;</tt> is <tt>true</tt>.</p></li>
65+
</ol>
6666
[&hellip;]
6767
</blockquote>
6868

0 commit comments

Comments
 (0)