> #include <memory>
>
> using my_allocator = std::allocator<char>;
> using derived_allocator = my_allocator::rebind<int>::other;
> my_allocator ma;
> derived_allocator da( ma );
I've got it; now it works like this:
#include <memory>
using my_allocator = std::allocator<char>;
using derived_allocator =
std::allocator_traits<my_allocator>::rebind_alloc<int>;
my_allocator ma;
derived_allocator da( ma );
This unfortunately means that I've to specialize std::allocator_traits
for my NUMA-allocator. That's more work than simply implementing rebind
for my NUMA-allocator-class.