public static member function
<memory>
static size_type max_size (allocator_type& alloc);
Maximum size possible to allocate
Returns the maximum number of elements that could be allocated with allocator alloc.
Still, there is no guarantee that a later call to allocate with that value will succeed.
In the non-specialized definition of allocator_traits, this member function returns alloc.max_size() if such an expression is well formed. Otherwise, it returns numeric_limits<size_type>::max(). A specialization for a specific allocator type may provide a different definition.
Parameters
- alloc
- Allocator object
allocator_type is an alias of allocator_traits's template parameter.