From 94f52d49dc907d57f4046558eb5c3f8a07595acd Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 12 Mar 2016 21:25:53 +0900 Subject: [PATCH] BlockAllocator: Delete copy ctor and assignment operator --- src/allocator.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/allocator.h b/src/allocator.h index 28fe8eb0..64bdff49 100644 --- a/src/allocator.h +++ b/src/allocator.h @@ -62,6 +62,12 @@ struct BlockAllocator { } } + BlockAllocator(BlockAllocator &&) = default; + BlockAllocator &operator=(BlockAllocator &&) = default; + + BlockAllocator(const BlockAllocator &) = delete; + BlockAllocator &operator=(const BlockAllocator &) = delete; + MemBlock *alloc_mem_block(size_t size) { auto block = new uint8_t[sizeof(MemBlock) + size]; auto mb = reinterpret_cast(block);