PR45099 notes (correctly) that we're inconsistent in memory allocation in std::any. We allocate memory with std::allocator<T>::allocate, construct with placement new, destroy by calling the destructor directly, and deallocate by calling delete. Most of those are customizable by the user - but in different ways.
The standard is silent on how these things are to be accomplished.
This patch makes it so we use allocator_traits<allocator<T>> for all of these operations (allocate, construct, destruct, deallocate). This is, at least, consistent.
Can std::allocator have behavior that observably differs from this code? (which is just the default std::allocator inlined).