I looked at the documentation on object functions for more, less. Although I understand what’s in it, I don’t understand yet. Will a larger container be used in ascending or descending order? I am particularly confused because the next two lines seem to do the opposite.
std::priority_queue<int, std::vector<int>, std::greater<int> > q2; for(int n : {1,8,5,6,3,4,0,9,7,2}) q2.push(n); print_queue(p2);
Fingerprints 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. But
int x[10] = { 1,3,5,7,9,2,4,6,8,10 }; std::sort(x,x+10,std::greater<int>());
Printing this file will give 10, 9, 8, 7, 6, 5, 4, 3, 2, 1.
It would be nice if someone could describe how the “more” works in my examples, instead of just saying how the “more” works in general.