std::{{{1}}}::shrink_to_fit
From cppreference.com
void shrink_to_fit(); |
(since C++11) | |
Requests the removal of unused capacity.
It is a non-binding request to reduce capacity
to size
. It depends on the implementation if the request is fulfilled.
Information on iterator invalidation is copied from here |
Contents |
Parameters
(none)
Type requirements |
Return value
(none)
Complexity
Linear in the size of the container.
Example
Templated content. The link is cpp/container/<PP>/example_shrink_to_fit |
See also
returns the number of elements (public member function of std::{{{1}}} )
|