title: "stable_sort()ing" a STL <list> in C++
body: <p>I think the question title is clear enough: is is possible to stable_sort() a std::list in C++? Or do I have to convert it to a std::vector?</p>
  
  <p>I'm asking because I tried a simple example and it seems to require RandomAccessIterators, which a linked list doesn't have. So, <strong>how do I stable sort a std::list()</strong>?</p>
  
  <p><strong>EDIT:</strong> sample code that gives me an error:</p>
  
  <pre><code>#include &lt;list&gt;
  #include &lt;algorithm&gt;
  // ...
  list&lt;int&gt; the_list;
  stable_sort(the_list.begin(), the_list.end());
  </code></pre>
  
  <p>g++ gives me around 30 lines of errors (too long to paste), with some of them referring to RandomAccessIterators (and something called _merge_sort_loop). It's a little weird, since I've seen some merge sort implementations for linked lists and they are pretty much 'sequential'.</p>