Skip to content

Commit 2e455af

Browse files
authoredMay 22, 2024··
[util.smartptr.shared.cast] Properly describe possibility of double deletion in notes (#7037)
1 parent ad37b86 commit 2e455af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎source/memory.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -4356,7 +4356,7 @@
43564356
\begin{note}
43574357
The seemingly equivalent expression
43584358
\tcode{shared_ptr<T>(static_cast<T*>(r.get()))}
4359-
will eventually result in undefined behavior, attempting to delete the
4359+
can result in undefined behavior, attempting to delete the
43604360
same object twice.
43614361
\end{note}
43624362
\end{itemdescr}
@@ -4393,7 +4393,7 @@
43934393
\pnum
43944394
\begin{note}
43954395
The seemingly equivalent expression
4396-
\tcode{shared_ptr<T>(dynamic_cast<T*>(r.get()))} will eventually result in
4396+
\tcode{shared_ptr<T>(dynamic_cast<T*>(r.get()))} can result in
43974397
undefined behavior, attempting to delete the same object twice.
43984398
\end{note}
43994399
\end{itemdescr}
@@ -4422,7 +4422,7 @@
44224422
\pnum
44234423
\begin{note}
44244424
The seemingly equivalent expression
4425-
\tcode{shared_ptr<T>(const_cast<T*>(r.get()))} will eventually result in
4425+
\tcode{shared_ptr<T>(const_cast<T*>(r.get()))} can result in
44264426
undefined behavior, attempting to delete the same object twice.
44274427
\end{note}
44284428
\end{itemdescr}
@@ -4451,7 +4451,7 @@
44514451
\pnum
44524452
\begin{note}
44534453
The seemingly equivalent expression
4454-
\tcode{shared_ptr<T>(reinterpret_cast<T*>(r.get()))} will eventually result in
4454+
\tcode{shared_ptr<T>(reinterpret_cast<T*>(r.get()))} can result in
44554455
undefined behavior, attempting to delete the same object twice.
44564456
\end{note}
44574457
\end{itemdescr}

0 commit comments

Comments
 (0)
Please sign in to comment.