title: Container of sets using non-default comparison predicate
body: <p>I would like to create a <code>std::map&lt;T1, std::set&lt;T2&gt; &gt;</code> where the <code>set</code>s use a non-default comparator. For example, if I were declaring the <code>set</code> on its own, I would declare it as:</p>
  
  <pre><code>std::set&lt;int,bool(*)(int,int)&gt; s (fn_pt);
  </code></pre>
  
  <p>where <code>fn_pt</code> is a function pointer. In my example, when I add a new key to the <code>std::map</code>, I would like the set to be constructed with that non-default comparator. Is such a thing possible?</p>
  
  <p>To further complicate things, my compiler does not support C++11, so I can only accept a solution that does not require C++11; however, if there is a C++11 way of doing this, I would be interested in seeing that as well.</p>