定义于头文件
<memory>
|
||
static size_type max_size( const Alloc& a );
|
(C++11 起) | |
若可能,则从 a
获得最大理论可行的分配大小,通过调用
a.max_size()
若上述者不可行(例如 a
无成员函数 max_size()
),则返回 std::numeric_limits<size_type>::max()
(C++17 前)std::numeric_limits<size_type>::max() / sizeof(value_type) (C++17 起)
目录 |
(无)
理论最大分配大小
(C++17 中弃用)
|
返回最大的受支持分配大小 ( std::allocator 的公开成员函数)
|