I tried to get the size of an empty priority_queue. Something strange happened. Could anybody explain why this happened? Thanks a lot.
#include <iostream>
#include <queue>
using namespace std;
int main()
{
priority_queue<int, vector<int>, less<int> > asc_queue;
cout << asc_queue.size() << " " << asc_queue.size() - 1 << endl;
}
Output:
0 18446744073709551615