123456
explicit priority_queue ( const Compare& x = Compare(), const Container& y = Container() ); template <class InputIterator> priority_queue ( InputIterator first, InputIterator last, const Compare& x = Compare(), const Container& y = Container() );
1234
const int a[] = {1, 2, 3, 4, 5}; priority_queue <int> MyPQ1(a, a+5); //Ok priority_queue <int> MyPQ2(greater <int>); //Ok priority_queue <int> MyPQ3(a, a+5, greater <int>); //Error here
priority_queue <int> MyPQ2(greater <int>); //Ok Also an error.
priority_queue <int, vector<int>, greater<int> > MyPQ3(a, a+5); //Ok