Can't compile std::map sorting, why?
<p>This is my code:</p>

<pre><code>map&lt;string, int&gt; errs;
struct Compare {
    bool operator() (map&lt;string, int&gt;::const_iterator l, 
        map&lt;string, int&gt;::const_iterator r) { 
        return ((*l).second &lt; (*r).second); 
    }
} comp;
sort(errs.begin(), errs.end(), comp);
</code></pre>

<p>Can't compile. This is what I'm getting:</p>

<pre><code>no matching function for call to ‘sort(..’
</code></pre>

<p>Why so? Can anyone help? Thanks!</p>
