You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: issue2751.html
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@
64
64
<p><em>This page is a snapshot from the LWG issues list, see the <ahref="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <ahref="lwg-active.html#New">New</a> status.</em></p>
65
65
<h3id="2751"><ahref="lwg-active.html#2751">2751</a>. <code>shared_ptr</code> deleter not specified to observe expired <code>weak_ptr</code> instances</h3>
<p><b>View all other</b><ahref="lwg-index.html#util.smartptr.shared.dest">issues</a> in [util.smartptr.shared.dest].</p>
@@ -118,6 +118,11 @@ <h3 id="2751"><a href="lwg-active.html#2751">2751</a>. <code>shared_ptr</code> d
118
118
behaviour.
119
119
</p>
120
120
121
+
<p><i>[2025-03-18, Jonathan comments]</i></p>
122
+
123
+
<p>See also <ahref="lwg-closed.html#2907" title="Semantics for destroying the deleter and the control-block of a shared_ptr are unclear (Status: NAD)">2907</a><sup><ahref="https://cplusplus.github.io/LWG/issue2907" title="Latest snapshot">(i)</a></sup>.</p>
Copy file name to clipboardExpand all lines: issue2907.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@
64
64
<p><em>This page is a snapshot from the LWG issues list, see the <ahref="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <ahref="lwg-active.html#NAD">NAD</a> status.</em></p>
65
65
<h3id="2907"><ahref="lwg-closed.html#2907">2907</a>. Semantics for destroying the deleter and the control-block of a <code>shared_ptr</code> are unclear</h3>
<b>Submitter:</b> United States <b>Opened:</b> 2017-02-03 <b>Last modified:</b>2017-07-15</p>
67
+
<b>Submitter:</b> United States <b>Opened:</b> 2017-02-03 <b>Last modified:</b>2025-03-18</p>
68
68
<p><b>Priority: </b>Not Prioritized
69
69
</p>
70
70
<p><b>View all other</b><ahref="lwg-index.html#util.smartptr.shared.dest">issues</a> in [util.smartptr.shared.dest].</p>
@@ -79,7 +79,7 @@ <h3 id="2907"><a href="lwg-closed.html#2907">2907</a>. Semantics for destroying
79
79
but ensuring that <code>d(p)</code> completes before the <code>shared_ptr</code> gives up its weak reference; making a copy of
80
80
<code>d</code> in the destructor before manipulating the weak count, and then using this copy to run <code>d(p)</code>, even while
81
81
the control-block could be concurrently reclaimed with an expiring <code>weak_ptr</code> in another thread. Note that this
82
-
may be related to LWG <ahref="lwg-active.html#2751" title="shared_ptr deleter not specified to observe expired weak_ptr instances (Status: New)">2751</a><sup><ahref="https://cplusplus.github.io/LWG/issue2751" title="Latest snapshot">(i)</a></sup>. (Also, see the note in 20.11.2.2.10 p1 [util.smartptr.getdeleter])</p>
82
+
may be related to LWG <ahref="lwg-active.html#2751" title="shared_ptr deleter not specified to observe expired weak_ptr instances (Status: New)">2751</a><sup><ahref="https://cplusplus.github.io/LWG/issue2751" title="Latest snapshot">(i)</a></sup>. (Also, see the note in 20.3.2.2.11 <ahref="https://wg21.link/util.smartptr.getdeleter">[util.smartptr.getdeleter]</a> p1)</p>
83
83
84
84
<p>Proposed change: Clarify that the <code>shared_ptr</code> weak ownership of the control block is released at the end of the
85
85
destructor, and not as the destructor begins. Otherwise, the deleter might be destroyed even before the destructor gets to
<p>See also <a href="lwg-closed.html#2907" title="Semantics for destroying the deleter and the control-block of a shared_ptr are unclear (Status: NAD)">2907</a><sup><a href="https://cplusplus.github.io/LWG/issue2907" title="Latest snapshot">(i)</a></sup>.</p>
<h3 id="2907"><a href="#2907">2907</a><sup><a href="https://cplusplus.github.io/LWG/issue2907">(i)</a></sup>. Semantics for destroying the deleter and the control-block of a <code>shared_ptr</code> are unclear</h3>
but ensuring that <code>d(p)</code> completes before the <code>shared_ptr</code> gives up its weak reference; making a copy of
54030
54030
<code>d</code> in the destructor before manipulating the weak count, and then using this copy to run <code>d(p)</code>, even while
54031
54031
the control-block could be concurrently reclaimed with an expiring <code>weak_ptr</code> in another thread. Note that this
54032
-
may be related to LWG <a href="lwg-active.html#2751" title="shared_ptr deleter not specified to observe expired weak_ptr instances (Status: New)">2751</a><sup><a href="https://cplusplus.github.io/LWG/issue2751" title="Latest snapshot">(i)</a></sup>. (Also, see the note in 20.11.2.2.10 p1 [util.smartptr.getdeleter])</p>
54032
+
may be related to LWG <a href="lwg-active.html#2751" title="shared_ptr deleter not specified to observe expired weak_ptr instances (Status: New)">2751</a><sup><a href="https://cplusplus.github.io/LWG/issue2751" title="Latest snapshot">(i)</a></sup>. (Also, see the note in 20.3.2.2.11 <a href="https://wg21.link/util.smartptr.getdeleter">[util.smartptr.getdeleter]</a> p1)</p>
54033
54033
54034
54034
<p>Proposed change: Clarify that the <code>shared_ptr</code> weak ownership of the control block is released at the end of the
54035
54035
destructor, and not as the destructor begins. Otherwise, the deleter might be destroyed even before the destructor gets to
Copy file name to clipboardExpand all lines: lwg-index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ <h1>Index by Section</h1>
66
66
<p>This document is the Index by Section for the <a href="lwg-active.html">Library Active Issues List</a>, <a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.</p>
67
67
<h2>Index by Section</h2>
68
68
<p><a href="lwg-index-open.html">(view only non-Ready open issues)</a></p>
<td id="2751"><a href="lwg-active.html#2751" title="shared_ptr deleter not specified to observe expired weak_ptr instances (Status: New)">2751</a><sup><a href="https://cplusplus.github.io/LWG/issue2751">(i)</a></sup></td>
4178
-
<td><a href="lwg-active.html#New">New</a></td>
4179
-
<td>20.3.2.2.3 [util.smartptr.shared.dest]</td>
4180
-
<td><code>shared_ptr</code> deleter not specified to observe expired <code>weak_ptr</code> instances</td>
4181
-
<td><span class="no-pr">No</span></td>
4182
-
<td>4</td>
4183
-
<td></td>
4184
-
</tr>
4185
-
<tr>
4186
4186
<td id="2949"><a href="lwg-active.html#2949" title="Unclear complexity requirements: space vs. time (Status: New)">2949</a><sup><a href="https://cplusplus.github.io/LWG/issue2949">(i)</a></sup></td>
<td id="2907"><a href="lwg-closed.html#2907" title="Semantics for destroying the deleter and the control-block of a shared_ptr are unclear (Status: NAD)">2907</a><sup><a href="https://cplusplus.github.io/LWG/issue2907">(i)</a></sup></td>
29115
+
<td><a href="lwg-active.html#NAD">NAD</a></td>
29116
+
<td>20.3.2.2.3 [util.smartptr.shared.dest]</td>
29117
+
<td>Semantics for destroying the deleter and the control-block of a <code>shared_ptr</code> are unclear</td>
<td id="2907"><a href="lwg-closed.html#2907" title="Semantics for destroying the deleter and the control-block of a shared_ptr are unclear (Status: NAD)">2907</a><sup><a href="https://cplusplus.github.io/LWG/issue2907">(i)</a></sup></td>
30226
-
<td><a href="lwg-active.html#NAD">NAD</a></td>
30227
-
<td>20.3.2.2.3 [util.smartptr.shared.dest]</td>
30228
-
<td>Semantics for destroying the deleter and the control-block of a <code>shared_ptr</code> are unclear</td>
30229
-
<td>Yes</td>
30230
-
<td></td>
30231
-
<td></td>
30232
-
</tr>
30233
-
<tr>
30234
30234
<td id="2992"><a href="lwg-closed.html#2992" title="system_category() and error_code::error_code() should be constexpr (Status: NAD)">2992</a><sup><a href="https://cplusplus.github.io/LWG/issue2992">(i)</a></sup></td>
0 commit comments