public member function
<queue>
std::priority_queue::size
Return size
This member function effectively calls member size of the underlying container object.
Parameters
noneReturn Value
The number of elements in the underlying container.Member type size_type is an unsigned integral type.
Example
|
|
Output:
0. size: 0 1. size: 5 2. size: 4
Complexity
Constant (calling size on the underlying container).
See also
- priority_queue::empty
- Test whether container is empty (public member function)