How do I pass a 'general' priority_queue as function argument in c++
In my main function, I have a bunch of priority_queues all of them have int in them, but some have less<int>, others have greater<int>: //std:: removed for clarity priority_queue<int, vector<int>, less<int>> pq1; priority_queue<int, vector<int>, greater<int>> pq2; I wish to make a function that accepts two priority_queue by reference and pops the first and puts into… Read More How do I pass a 'general' priority_queue as function argument in c++