![]() |
VOOZH | about |
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.
Syntax
size unordered_map.max_size()Parameters:
It does not accept any parameters.
Return type:
Unsigned integer a container can hold maximum elements.
Example 1
Current size is : 0 max size is : 1152921504606846975 Current size is : 4 max size is : 1152921504606846975
Example 2
Current size is : 0 max size is : 1152921504606846975 Current size is : 3 max size is : 1152921504606846975
Complexity :
Its complexity is constant.