std::allocator::max_size

std::allocator::max_size

size_type max_size() const;
(deprecated since C++17)

Returns the maximum theoretically possible value of n, for which the call allocate(n, 0) could succeed.

In most implementations, this returns std::numeric_limits<size_type>::max() / sizeof(value_type).

Parameters

(none).

Return value

The maximum supported allocation size.

Exceptions

(none) (until C++11)
noexcept specification:
noexcept
(since C++11)

See also

[static]
returns the maximum object size supported by the allocator
(public static member function of std::allocator_traits)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/memory/allocator/max_size

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部