Namespaces
Variants

std::inplace_vector<T,N>::shrink_to_fit

ja.cppreference.net より
 
 
 
 
static constexpr void shrink_to_fit() noexcept;
(C++26以降)

何もしません。

名目上、この関数は容量を減らすための非拘束的な要求であり、内部ストレージにsize()個の要素のみが含まれるようにします。しかし、そのような要求は固定容量コンテナstd::inplace_vector<T, N>では常に無視されます。

計算量

定数。

注記

この関数はベクトルライクなインターフェースとの互換性のために存在します。

関連項目

要素数を返す
(public member function)
格納されている要素数を変更する
(public member function)
[static]
現在割り当てられているストレージに保持できる要素数を返す
(public static member function)
未使用のメモリを解放してメモリ使用量を削減する
( std::vector<T,Allocator> のpublic member function)
未使用のメモリを解放してメモリ使用量を削減する
( std::deque<T,Allocator> のpublic member function)