Many questions on SO ask about placement new feature of C++ (example 1, example 2) why it is used for. Many answers saying – custom allocating of objects like in pre-allocated spaces.
But question is – why need placement new for this? Won’t just overload of operator new for class enough? By overload operator new for class I can exactly control where memory taken from – like call custom allocator. So why would I need placement new for this purpose?
You are correct in thinking that both can be used to solve a same category of problems, but what you are missing is that operator new overloading is intrusive (allocation strategy is in the object), while placement new isn’t (allocation strategy is completely independent).
Martin York’s answer provides a great example in this regard :
std::vector<>holds its very own allocation strategy without adding any requirement on the typeT.