How to call a function when using a map constructor?
<p>I found this code at <a href="http://www.cplusplus.com/reference/stl/map/map/" rel="nofollow">here</a>.  How does the compiler know to use the function defined in classcomp?</p>

<p>struct/fucntion</p>

<pre><code>struct classcomp 
  {
  bool operator() (const char&amp; lhs, const char&amp; rhs) const
    {
    return lhs&lt;rhs;
    }
  };
</code></pre>

<p>Map Construction</p>

<pre><code>  map&lt;char,int,classcomp&gt; fourthm;
</code></pre>

<p>Constructor Prototypes from link above:</p>

<pre><code>explicit map ( const Compare&amp; comp = Compare(),const Allocator&amp; = Allocator() );

template &lt;class InputIterator&gt; map ( InputIterator first, InputIterator last,const Compare&amp; comp = Compare(), const Allocator&amp; = Allocator() );

map ( const map&lt;Key,T,Compare,Allocator&gt;&amp; x );
</code></pre>
