The unordered_set::max_size() is a built-in function in C++ STL, defined in <unordered_set.h> which returns maximum number of elements that an unordered_set container can hold(i.e the maximum size of the unordered_set) due to system constraints or internal implementation .
Parameters: This function does not accepts any parameter. It simply returns the maximum size of the container.
Return Value: This function returns the maximum number of elements that the unordered_set can hold.
Exception: This function does not throw any kind of exception.
Below program illustrate the unordered_set::max_size() function in C++:
Time Complexity: O(1)
- multimap maxsize() in C++ STL
- What is Hactoberfest and How One Can Take Participate in it?
- CSS | Combine background image with gradient overlay
- How to Design Half-Page Carousel in Bootstrap ?
- What is the meaning of let-* in Angular 2 Templates ?
- Difference between multiple arguments and options object
- How to Check Twitter Bootstrap is Loaded or not ?
- How to iterate through all selected elements into an array ?
- How to put images in a box without space using Bootstrap?
- Node.js | Buffer.alloc() Method
- How to insert HTML into view from AngularJS controller?
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.