public member function
<unordered_map>
std::unordered_map::size
size_type size() const noexcept;
Return container size
Parameters
noneReturn Value
The number of elements in the container.Member type
size_type is an unsigned integral type.Example
|
|
Output:
Complexity
Constant.Iterator validity
No changes.See also
- unordered_map::max_size
- Return maximum size (public member function)
- unordered_map::empty
- Test whether container is empty (public member function)