Skip to content

Commit efb0876

Browse files
committed
Workaround for annoying compilers that dont move
1 parent 85a5648 commit efb0876

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/LoadStoreChunk.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ namespace
5353
auto
5454
asWriteBuffer(UniquePtrWithLambda<T const> &&ptr) -> auxiliary::WriteBuffer
5555
{
56-
auto raw_ptr = ptr.get();
56+
auto raw_ptr = ptr.release();
5757
return asWriteBuffer(std::shared_ptr<T const>{
58-
raw_ptr, [ptr_lambda = std::move(ptr)](auto const *) {}});
58+
raw_ptr,
59+
[deleter = std::move(ptr.get_deleter())](auto const *delete_me) {
60+
deleter(delete_me);
61+
}});
5962
}
6063
} // namespace
6164

0 commit comments

Comments
 (0)