##Comment on testing
Comment on testing
If you are not going to bother with deletedelete then you may as well write a much simpler version.
##Code Review
Code Review
You should mark youyour move operatorconstructor as noexcept.
pool(pool&& o) // Why is this not noexcept here.noexcept;
The standard way to implement this is using swap()swap(). See my implementation above. This handles situations like this in a safe way.
Should this not be char*.? The calloperator offsetof() returns the offset in bytes. The char by definition fits into 1 byte, thus a char* is a 1 byte addressable range. Also the standard has special properties for char* that other integer types don't have.
##Comments on testing code.
Comments on testing code
You could use placement new-new to make them more similar. But personally I would override the new/delete operatornew and delete operators so that it usesthey use your pool.
You are forcing a move of all the iterators in the vector. Rather than erasing it, just free the memory and set the pointer to nullptrnullptr. That would be a much better test.
You should use exactly the same code for both tests. The only difference should be the allocator used. You should have one test that uses your custom allocator. While the second test uses an allocator that simply calls newnew/deletedelete underneath the hood.