title: std::set - like function object support in my container
body: <p>I have implemented my own container:</p>
  
  <pre><code>template&lt;typename T&gt;
  class MyContainer
  {
      // body where in some point 2 elements of collection are compared (-1, 0 and 1 possible comparison results)
  };
  </code></pre>
  
  <p>What I want to do is add support of function objects, just like in std::set, where it is possible to do function object like this:</p>
  
  <pre><code>struct Comparator
  {
      bool operator()(const char* s1, const char* s2) const
      {
          return strcmp(s1, s2) &lt; 0;
      }
  };
  </code></pre>
  
  <p>and then pass it as set parameter:</p>
  
  <pre><code>std::set&lt;const char*, Comparator&gt; SomeSet;
  </code></pre>
  
  <p>I'm not every-day C++ programmer, so I need help to achieve that. What must I do in order to add support to this? Must I create field in <code>MyContainer</code> in order to store function object in it to use it in my sorting methods inside container?</p>