implementation of the polymorphic allocator pattern std::n3525