Unable to use custom allocator with allocate_shared/make_shared
问题 In my C++11 program, I use shared_ptr<T> for some objects which are actively created and deleted. It so happened that standard allocator with operator new is a bottleneck, so I want to create my own one, which will allocate a bunch of memory at once and then give to to make_shared on demand. Unfortunatelly, this is the first time I write an allocator and I have no idea why GCC is unable to compile the following code: #include <memory> class MyAlloc { public: typedef char* pointer; typedef