After reading this link, I've known that placement new
was too hard to use properly. Then I found std::allocator
, so I thought std::allocator
should have used placement new
because it could separate allocation and do construction in two steps.
However, it seems that How are allocator in C++ implemented? tells me that std::allocator
is implemented by operator new
, instead of placement new
. I'm confused now. If it doesn't use placement new
, how could it separate allocation and do construction in two steps?