Here is the documentation on cppreference, here is the working draft.
I must admit that I didn't understand what's the real purpose of polymorphic_allocator
and when/why/how I should use it.
As an example, the pmr::vector
has the following signature:
namespace pmr {
template <class T>
using vector = std::vector<T, polymorphic_allocator<T>>;
}
What does the polymorphic_allocator
offer? What does the std::pmr::vector
offer as well in regard of the old-fashioned std::vector
?
What can I do now that I wasn't able to do till now?
What's the real purpose of that allocator and when should I use it actually?