View in context in the libbitcoin Slack #general mirror.
std::vector<T> is not the same type as a std::vector<T, A> where A is a custom allocator. This is why std::pmr::polymorphic_allocator was introduced in C++17. While pmr types instantiated with a memory resource are polymorphic, they require a constructor parameter, and aren't polymorphic with std::vector<T>:
template <typename T>
using pmr_vector = std::vector<T, std::pmr::polymorphic_allocator<T>>;
class my_memory_resource : public std::pmr::memory_resource
{
....
}
void foo()
{
my_memory_resource mem_res;
auto my_vector = pmr_vector<int>(0, &mem_res);
std::vector<int> v;
my_vector = v;
} (edited)