Skip to content

Commit 83ebaa1

Browse files
jensmaurertkoeppe
authored andcommitted
LWG3548 shared_ptr construction from unique_ptr should move (not copy) the deleter
1 parent 5938770 commit 83ebaa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/utilities.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9933,7 +9933,7 @@
99339933
\effects
99349934
If \tcode{r.get() == nullptr}, equivalent to \tcode{shared_ptr()}.
99359935
Otherwise, if \tcode{D} is not a reference type,
9936-
equivalent to \tcode{shared_ptr(r.release(), r.get_deleter())}.
9936+
equivalent to \tcode{shared_ptr(r.release(), std::move(r.get_deleter()))}.
99379937
Otherwise, equivalent to \tcode{shared_ptr(r.release(), ref(r.get_deleter()))}.
99389938
If an exception is thrown, the constructor has no effect.
99399939
\end{itemdescr}

0 commit comments

Comments
 (0)