If T is move constructable, now moves on erase() instead of memcpying.