std::allocator_traits::max_size
Defined in header <memory> | | |
|---|---|---|
static size_type max_size( const Alloc& a ); | | (since C++11) |
如果可能的话,从分配程序获得最大的理论上可能的分配大小。a打电话。
a.max_size()...
如果以上不可能,则为%28例如。a没有成员函数max_size()%29,然后返回std::numeric_limits<size_type>::max()%28直到C++17%29std::numeric_limits<size_type>::max()/ sizeof(value_type)%28自C++17%29。
参数
%280%29
返回值
理论最大分配规模
例外
noexcept规格:
noexcept
另见
max_size (deprecated in C++17) | returns the largest supported allocation size (public member function of std::allocator) |
|---|
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

