Skip to content

Commit 03862a0

Browse files
committed
Superseded wording upon reflector discussion
1 parent d6e99f5 commit 03862a0

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

xml/issue4324.xml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ Given that the standard intends for `operator*` of `shared_ptr` and `unique_ptr`
4141
SFINAE-friendly based on <sref ref="[util.smartptr.shared.obs]"/>, regardless of the value of
4242
`static_assert`, it is reasonable to assume that there should be no hard error here.
4343
</p>
44-
</discussion>
4544

46-
<resolution>
45+
<superseded>
4746
<p>
4847
This wording is relative to <paper num="N5014"/>.
4948
</p>
@@ -75,6 +74,45 @@ decltype(*declval&lt;pointer&gt;())&gt;</tt> is `false`.
7574

7675
</li>
7776

77+
</ol>
78+
</superseded>
79+
80+
<note>2025-08-26; Reflector discussion</note>
81+
<p>
82+
During reflector triaging it had been pointed out that a better solution would be to constrain the
83+
`operator*` directly. The proposed wording has been updated to that effect.
84+
</p>
85+
</discussion>
86+
87+
<resolution>
88+
<p>
89+
This wording is relative to <paper num="N5014"/>.
90+
</p>
91+
92+
<ol>
93+
94+
<li><p>Modify <sref ref="[unique.ptr.single.observers]"/> as indicated:</p>
95+
96+
<blockquote>
97+
<pre>
98+
constexpr add_lvalue_reference_t&lt;T&gt; operator*() const noexcept(noexcept(*declval&lt;pointer&gt;()));
99+
</pre>
100+
<blockquote>
101+
<p>
102+
<ins>-?- <i>Constraints:</i>: <tt>*declval&lt;pointer&gt;()</tt> is a well-formed expression.</ins>
103+
<p/>
104+
-1- <i>Mandates</i>: <tt>reference_converts_from_temporary_v&lt;add_lvalue_reference_t&lt;T&gt;,
105+
decltype(*declval&lt;pointer&gt;())&gt;</tt> is `false`.
106+
<p/>
107+
-2- <i>Preconditions</i>: `get() != nullptr` is `true`.
108+
<p/>
109+
-3- <i>Returns</i>: `*get()`.
110+
</p>
111+
</blockquote>
112+
</blockquote>
113+
114+
</li>
115+
78116
</ol>
79117
</resolution>
80118

0 commit comments

Comments
 (0)