title: Priority Queue With a Custom Comparator No Matching Constructor
body: <p>I am trying to create a priority queue with a custom comparator but the following code gives me a compile error:</p>
  <pre><code>    auto comparator = [](std::pair&lt;std::vector&lt;int&gt;, File&amp;&gt; const &amp;a, std::pair&lt;std::vector&lt;int&gt;, File&amp;&gt; const &amp;b) {
        return a.first.front() &gt; b.first.front();  
  };
  
       std::priority_queue&lt;std::pair&lt;std::vector&lt;uint64_t&gt;, File&amp;&gt;,
        std::vector&lt;std::pair&lt;std::vector&lt;uint64_t&gt;, File&amp;&gt;&gt;,
        decltype(comparator)&gt; pq;
  
  </code></pre>
  <p>This is the error I am getting:</p>
  <p>In template: no matching constructor for initialization of 'std::priority_queue&lt;std::pair&lt;std::vector, moderndbs::File &amp;&gt;, std::vector&lt;std::pair&lt;std::vector, moderndbs::File &amp;&gt;&gt;, (lambda at</p>