title: Sort list using STL sort function
body: <p>I'm trying to sort a list (part of a class) in descending order containing items of a <code>struct</code>, but it doesn't compile:</p>
  
  <blockquote>
    <p>error: no match for 'operator-' in '__last - __first'</p>
  </blockquote>
  
  <pre><code>sort(Result.poly.begin(), Result.poly.end(), SortDescending());
  </code></pre>
  
  <p>And here's <code>SortDescending</code>: </p>
  
  <pre><code>struct SortDescending
  {
      bool operator()(const term&amp; t1, const term&amp; t2)
      { 
          return t2.pow &lt; t1.pow; 
      }
  };
  </code></pre>
  
  <p>Can anyone tell me what's wrong?</p>