Why doesn't this inner class compile?
<p>This is my code:</p>

<pre><code>#include &lt;algorithm&gt;
class A {
  void f() {
    struct CompareMe {
      bool operator() (int i, int j) { return i &lt; j; }
    } comp;
    int a[] = {1, 2, 3, 4};
    int found = std::min_element(a[0], a[3], comp);
  }
}
</code></pre>

<p>Error message:</p>

<pre>
no matching function for call to ‘min_element(int&, int&, A::f()::CompareMe&)
</pre>

<p>What am I doing wrong?</p>
