std::inplace_vector<T,N>::shrink_to_fit
From cppreference.com
< cpp | container | inplace vector
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Containers library
(C++17)
(C++11)
(C++26)
(C++26)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++23)
(C++23)
(C++20)
(C++23)
Tables
std::inplace_vector
inplace_vector::shrink_to_fit
static constexpr void shrink_to_fit() noexcept;
(since C++26)
Does nothing.
Nominally, this function is a non-binding request to decrease capacity so that the internal storage contains only size() elements. However, such a request is always ignored by the fixed-capacity container std::inplace_vector <T, N>.
[edit] Parameters
(none)
[edit] Return value
(none)
[edit] Complexity
Constant.
[edit] Notes
This function exists for compatibility with vector-like interfaces.
[edit] See also
[static]
(public static member function) [edit]
(DR*)
(public member function of
std::vector<T,Allocator>
) [edit]
(DR*)
(public member function of
std::deque<T,Allocator>
) [edit]