The max_size() of unordered_multiset takes the maximum number of elements that the unordered_multiset container is able to hold due to system or It gets the maximum size of the controlled sequence.
size_type max_size() const;
where size_type is an unsigned integral type.
Returns : The member function returns the length of the longest sequence that the object can hold. In short, the maximum number of elements.
Below program illustrate the unordered_multiset max_size function :-
Maximum size = 1152921504606846975 Current size = 6
It takes constant(O(1)) time of complexity to perform an operation.
- multimap maxsize() in C++ STL
- How to execute AngularJS controller function on page load ?
- How to use Explode effect in jQuery ?
- What is the purpose of "role" attribute in HTML ?
- Difference between console.dir and console.log
- How to universally parse JSON into blocks using jQuery ?
- How to bind 'touchstart' and 'click' events but not respond to both ?
- if/else condition in CSS
- CSS | Ordering Flex Items
- Difference between DOMContentLoaded and load Events
- HTML | DOM scrollIntoView() Method
- Last-child and last-of-type selector in SASS
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.