From 644b2331f6b9d5428c75fb228b993d63965c62fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Tue, 25 Jun 2024 15:55:39 +0200 Subject: [PATCH] Workaround for annoying compilers that dont move --- src/LoadStoreChunk.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/LoadStoreChunk.cpp b/src/LoadStoreChunk.cpp index f65fd8cde5..056a0e713b 100644 --- a/src/LoadStoreChunk.cpp +++ b/src/LoadStoreChunk.cpp @@ -53,9 +53,12 @@ namespace auto asWriteBuffer(UniquePtrWithLambda &&ptr) -> auxiliary::WriteBuffer { - auto raw_ptr = ptr.get(); + auto raw_ptr = ptr.release(); return asWriteBuffer(std::shared_ptr{ - raw_ptr, [ptr_lambda = std::move(ptr)](auto const *) {}}); + raw_ptr, + [deleter = std::move(ptr.get_deleter())](auto const *delete_me) { + deleter(delete_me); + }}); } } // namespace