| Defined in header |
static size_type max_size( const Alloc& a ) noexcept;
| (since C++11) |
static constexpr size_type max_size( const Alloc& a ) noexcept;
If possible, obtains the maximum theoretically possible allocation size from the allocator
a, by calling
If the above is not possible (e.g.
Alloc does not have the member function
max_size()), then returns
std::numeric_limits<size_type>::max() / sizeof(value_type).
|a||-||allocator to detect|
Theoretical maximum allocation size.
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
|DR||Applied to||Behavior as published||Correct behavior|
|LWG 2162||C++11|| ||required|
|LWG 2466||C++11||theoretical maximum allocation size in bytes was returned as fallback||size in elements is returned|
| returns the largest supported allocation size
(public member function of
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.