The forward_list::max_size() is a built-in function in C++ STL which returns the maximum number of elements a forward_list container can hold
Parameters: The function does not accept any parameters.
Return Value: The function returns the maximum number of elements the container can hold.
Below programs illustrate the above function:
The forward_list elements: 8 8 8 8 8 The max size: 1152921504606846975
The max size: 1152921504606846975
- multimap maxsize() in C++ STL
- ratio_equal() in C++ with examples
- negative_binomial_distribution in C++ with Examples
- ios bad() function in C++ with Examples
- ios eof() function in C++ with Examples
- std::allocator() in C++ with Examples
- ratio_not_equal() in C++ with examples
- SDL library in C/C++ with examples
- Pointers in C/C++ with Examples
- feclearexcept in C++ with Examples
- memset() in C with examples
- wmemset() in C/C++ with Examples
- mbrtoc32() in C/C++ with Examples
- iswgraph() in C/C++ with Examples
- set_symmetric_difference in C++ with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.