BlockAllocator: Delete copy ctor and assignment operator

This commit is contained in:
Tatsuhiro Tsujikawa 2016-03-12 21:25:53 +09:00
parent 0720671e0a
commit 94f52d49dc
1 changed files with 6 additions and 0 deletions

View File

@ -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<MemBlock *>(block);