|
list::max_sizepublic member function
size_type max_size () const; Return maximum size Returns the maximum number of elements that the list container can hold.This is the maximum potential size the container can reach due to system or library implementation limitations. ParametersnoneReturn ValueThe maximum number of elements a list container can have as its content.Member type size_type is an unsigned integral type. Example
Here, member max_size is used to check beforehand whether the requested size will be allowed by member resize. ComplexityConstant (recommended). Linear in some implementations.See also
|