title: std::greater on a an std::pair of a double and a class
body: <p>Does <code>std::greater</code> work when you have a <code>std::pair</code> of <code>int</code> and a class? </p>
  
  <p>I am trying to create a priority queue of pairs, ordered by the first element:</p>
  
  <pre><code>std::priority_queue&lt;std::pair&lt;double, classA&gt;, std::vector&lt;std::pair&lt;double, classA&gt;&gt;, std::greater&lt;std::pair&lt;double, classA&gt;&gt;&gt; priorityQueue
  </code></pre>
  
  <p>But I get an error that says</p>
  
  <blockquote>
    <p>no match for 'operator&lt;'`</p>
  </blockquote>
  
  <p>And it alludes to the second element of the <code>std::pair</code>, which is of class type. </p>
  
  <p>Is <code>std::greater</code> applied to the first and second elements of the <code>std::pair</code>?</p>