bsl::basic_string<char32_t>::shrink_to_fit

Request the removal of unused capacity by causing reallocation. Note that this method has no effect if the capacity is equal to the size. Also note that if (and only if) reallocation occurs, all iterators, including the past the end iterator, and all references to the elements are invalidated.

Synopsis

Declared in <bslstl_string.h>

void
shrink_to_fit();