首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

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)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com