Skip to content

Commit 6548067

Browse files
committed
Jonathan provides new wording for 4304
1 parent 7734671 commit 6548067

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

xml/issue4304.xml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -91,29 +91,11 @@ This wording is relative to <paper num="N5014"/>.
9191

9292
<ol>
9393

94-
<li><p>Modify <sref ref="[optional.optional.ref.general]"/>, header <tt>&lt;iterator&gt;</tt> synopsis, as indicated:</p>
95-
96-
<blockquote>
97-
<pre>
98-
namespace std {
99-
template&lt;class T&gt;
100-
class optional&lt;T&amp;&gt; {
101-
[&hellip;]
102-
constexpr T&amp; value() const; // freestanding-deleted
103-
template&lt;class U = remove_cv_t&lt;T&gt;&gt;
104-
constexpr <ins>decay_t</ins><del>remove_cv_t</del>&lt;T&gt; value_or(U&amp;&amp; u) const;
105-
[&hellip;]
106-
};
107-
}
108-
</pre>
109-
</blockquote>
110-
</li>
111-
11294
<li><p>Modify <sref ref="[optional.ref.observe]"/> as indicated:</p>
11395

11496
<blockquote>
11597
<pre>
116-
template&lt;class U = remove_cv_t&lt;T&gt;&gt; constexpr <ins>decay_t</ins><del>remove_cv_t</del>&lt;T&gt; value_or(U&amp;&amp; u) const;
98+
template&lt;class U = remove_cv_t&lt;T&gt;&gt; constexpr remove_cv_t&lt;T&gt; value_or(U&amp;&amp; u) const;
11799
</pre>
118100
<blockquote>
119101
<p>
@@ -132,6 +114,18 @@ template&lt;class U = remove_cv_t&lt;T&gt;&gt; constexpr <ins>decay_t</ins><del>
132114
<blockquote><pre>
133115
return has_value() ? *<i>val</i> : static_cast&lt;X&gt;(std::forward&lt;U&gt;(u));
134116
</pre></blockquote>
117+
<p>
118+
<ins>
119+
-?- <i>Remarks</i>:
120+
The return type is unspecified if `T` is an array type or a non-object type.
121+
[<i>Note ?</i>: For example,
122+
<code>decay_t&lt;T&gt;</code> or
123+
<code>conditional_t&lt;is_object_v&lt;T&gt; &amp;&amp; !is_array_v&lt;T&gt;,
124+
remove_cvref_t&lt;T&gt;, void&gt;</code>
125+
could be used to avoid the declaration being ill-formed.
126+
<i>&mdash; end note</i>]
127+
</ins>
128+
</p>
135129
</blockquote>
136130
</blockquote>
137131
</li>

0 commit comments

Comments
 (0)