The unordered_map::max_size is a built in function in C++ STL. It returns maximum number of elements which unordered_map can hold. Maximum number of elements in any container depends upon system and library implementation.
Parameters: It does not accept any parameters.
Return type: Unsigned integer a container can hold maximum elements.
Current size is : 0 max size is : 1152921504606846975 Current size is : 4 max size is : 1152921504606846975
Current size is : 0 max size is : 1152921504606846975 Current size is : 3 max size is : 1152921504606846975
Complexity : Its complexity is constant.
- multimap maxsize() in C++ STL
- Minimum cells to be flipped to get a 2*2 submatrix with equal elements
- Nested Loops in C++ with Examples
- _Find_first() function in C++ bitset with Examples
- _Find_next() function in C++ bitset with Examples
- Left-Right traversal of all the levels of N-ary tree
- Difference between Iterators and Pointers in C/C++ with Examples
- ostream::seekp(pos) method in C++ with Exmaples
- Default Methods in C++ with Examples
- C++ Tutorial
- Hello World Program : First program while learning Programming
- Difference between Argument and Parameter in C/C++ with Examples
- <cfloat> float.h in C/C++ with Examples
- C/C++ #include directive with Examples
- C/C++ if else statement 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.