File tree Expand file tree Collapse file tree 1 file changed +40
-2
lines changed
Expand file tree Collapse file tree 1 file changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,8 @@ Given that the standard intends for `operator*` of `shared_ptr` and `unique_ptr`
4141SFINAE-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 >
4847This wording is relative to <paper num =" N5014" />.
4948</p >
@@ -75,6 +74,45 @@ decltype(*declval<pointer>())></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< T> operator*() const noexcept(noexcept(*declval< pointer> ()));
99+ </pre >
100+ <blockquote >
101+ <p >
102+ <ins >-?- <i >Constraints:</i >: <tt >*declval< pointer> ()</tt > is a well-formed expression.</ins >
103+ <p />
104+ -1- <i >Mandates</i >: <tt >reference_converts_from_temporary_v< add_lvalue_reference_t< T> ,
105+ decltype(*declval< pointer> ())> </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
You can’t perform that action at this time.
0 commit comments