title: using min_element on partial order
body: <p>Can <code>std::min_element</code> (and also <code>std::sort</code> and similar functions from <code>&lt;algorithm&gt;</code>) be used on types with only a partial order?</p>
  
  <p>For example:</p>
  
  <pre><code>auto it = std::min_element(vec.cbegin(), vec.cend(), [](const node* a, const node* b) {
      return a-&gt;precedes(*b);
  });
  </code></pre>
  
  <p>Here <code>node</code> represents nodes in an DAG (directed acyclic graph), and <code>a.precedes(b)</code> tests it <code>a</code> is an ancestor of <code>b</code>. But if <code>a</code> and <code>b</code> are on different branches, it also returns <code>false</code>, and in that case <code>a.precedes(b) == b.precedes(a) == false</code>.</p>