constexpr void shrink_to_fit(); // since C++20 Requests the removal of unused capacity. It is a non-binding request to reduce capacity() to size(). It depends on the implementation whether the request is fulfilled. If reallocation occurs, all iterators, including the past the end iterator, and all references to the elements are invalidated. If no reallocation takes place, no iterators or referen..