fork(4) download
  1. #include <queue>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. bool cmp(int x, int y) { return (x > y); }
  6.  
  7. class A {
  8. public:
  9. private:
  10. priority_queue<int, vector<int>, decltype(&cmp) > pq{cmp};
  11. };
  12.  
  13.  
  14. int main() {
  15.  
  16. // priority_queue<int, vector<int>, decltype(cmp) > pq(cmp); // this is wrong, too
  17. return 0;
  18. }
Success #stdin #stdout 0s 3452KB
stdin
Standard input is empty
stdout
Standard output is empty