MemoryPoolAllocator: prohibit copying and assignment

The MemoryPoolAllocator implementation cannot and should not be
copied (Rule of Three).  Declare copy constructor and copy-assignment
operator as private.
This commit is contained in:
Philipp A. Hartmann 2014-02-01 18:05:12 +01:00
parent 72de00f672
commit 4b32a30593

View File

@ -187,6 +187,11 @@ public:
static void Free(void *ptr) { (void)ptr; } // Do nothing static void Free(void *ptr) { (void)ptr; } // Do nothing
private: private:
//! Copy constructor is not permitted.
MemoryPoolAllocator(const MemoryPoolAllocator& rhs) /* = delete */;
//! Copy assignment operator is not permitted.
MemoryPoolAllocator& operator=(const MemoryPoolAllocator& rhs) /* = delete */;
//! Creates a new chunk. //! Creates a new chunk.
/*! \param capacity Capacity of the chunk in bytes. /*! \param capacity Capacity of the chunk in bytes.
*/ */