std::allocator<T>:: max_size
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
(until C++20)
|
||||
|
(C++23)
|
||||
|
allocator::max_size
(until C++20)
|
||||
|
(until C++20)
|
||||
|
(until C++20)
|
||||
| Non-member functions | ||||
|
(until C++20)
|
|
size_type max_size
(
)
const
throw
(
)
;
|
(C++11まで) | |
|
size_type max_size
(
)
const
noexcept
;
|
(C++11から)
(C++17で非推奨) (C++20で削除) |
|
n
が取り得る理論上の最大値を返します。この値に対して
allocate
(
n,
0
)
の呼び出しが成功する可能性があります。
ほとんどの実装では、これは std:: numeric_limits < size_type > :: max ( ) / sizeof ( value_type ) を返します。
パラメータ
(なし)
戻り値
サポートされる最大割り当てサイズ。
関連項目
|
[static]
|
アロケータがサポートする最大オブジェクトサイズを返す
(
std::allocator_traits<Alloc>
の公開静的メンバ関数)
|