In The C++ Standard Library, it is said
A container might have member functions that provide much better performance.
As SFINAE allows detecting whether such member function exists (here, for instance), it shouldn’t be too complicated to write std::erase
such that it calls a container's member function if it exists. Why doesn’t it do that?