Skip to content

Commit

Permalink
Workaround for annoying compilers that dont move
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Jul 19, 2024
1 parent c4f0d01 commit 644b233
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/LoadStoreChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ namespace
auto
asWriteBuffer(UniquePtrWithLambda<T const> &&ptr) -> auxiliary::WriteBuffer
{
auto raw_ptr = ptr.get();
auto raw_ptr = ptr.release();
return asWriteBuffer(std::shared_ptr<T const>{
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

Expand Down

0 comments on commit 644b233

Please sign in to comment.