@Gene You can't do this with
std::allocator
, or at least not directly. Allocator requirements force it to be copyable, and the copy must be able to free the memory allocated by the original.