名前空間
変種
操作

std::allocator<T>::max_size

提供: cppreference.com
< cpp‎ | memory‎ | allocator
 
 
動的メモリ管理
未初期化記憶域
ガベージコレクションサポート
その他
(C++20)
(C++11)
(C++11)
C のライブラリ
低水準のメモリ管理
 
std::allocator
メンバ関数
(C++20未満)
allocator::max_size
(C++20未満)
(C++20未満)
非メンバ関数
 
size_type max_size()constthrow();
(C++11未満)
size_type max_size()constnoexcept;
(C++11以上)
(C++17で非推奨)
(C++20で削除)

allocate(n, 0) の呼び出しが成功する n の理論上可能な最大値を返します。

ほとんどの処理系では、これは std::numeric_limits<size_type>::max()/ sizeof(value_type) を返します。

[編集]引数

(なし)

[編集]戻り値

サポートされている最大確保サイズ。

[編集]関連項目

[静的]
アロケータでサポートされている最大オブジェクトサイズを返します
(std::allocator_traits<Alloc>のパブリック静的メンバ関数)[edit]
close