This is the maximum potential size the container can reach due to system or library implementation limitations.
Parameters
noneReturn Value
The maximum number of elements a list container can have as its content.Member type size_type is an unsigned integral type.
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Here, member max_size is used to check beforehand whether the requested size will be allowed by member resize.
Complexity
Constant (recommended). Linear in some implementations.See also
| list::size | Return size (public member function) |
| list::resize | Change size (public member function) |
