title: STL sort with retaining the original order
body: <p>I'd like to reverse-sort a vector of strings by size, with the constraint that if there are 2 strings of equal length, I'd like them to retain their original order. For eg: sorting the following set of strings :-</p>
  
  <pre><code>aab
  aac
  aacghgh
  aabghgh
  </code></pre>
  
  <p>should yield :-</p>
  
  <pre><code>aacghgh
  aabghgh
  aab
  aac
  </code></pre>
  
  <p>Currently I'm doing the sorting as follows :-</p>
  
  <pre><code>struct comp_functor {
      bool operator()(const string&amp; s1, const string&amp; s2) {
          return s1.size() &gt; s2.size();
      }
  };
  
  struct comp_functor c;
  vector&lt;string&gt; vecs;
  sort(vecs.begin(), vecs.end(), c);
  </code></pre>
  
  <p>Is there any way to specify in the overloaded method that I want to retain the original ordering if they have the same length? If not, what would be the best way to use STL libraries to solve this problem?</p>