title: Using different interface with stl datastructure
body: <p>I want to create a class with these two constructors, but <code>unordered_map&lt;void*,void*&gt; *</code> and those two created in constructor is not compatible. How can I change to make the following code works while preserving the prototype of the constructors.</p>
  
  <pre><code>struct eq_fun
  {
      bool operator()(void* s1, const void* s2) const
      {
          return ( _cmp_fn((void*)s1,(void*)s2) == 0 );
      }
      int (*_cmp_fn)(void*, void*);
      eq_fun(int (*fn)(void*, void*)):_cmp_fn(fn){}
  };
  
  struct hash_fun
  {
      size_t operator()(const void *p) const
      {
          return _hash_fn(p);
      }
      int (*_hash_fn)(const void*);
      hash_fun(int (*fn)(const void*)):_hash_fn(fn){}
  };
  
  class MyClass {
      private:
          unordered_map&lt;void*,void*&gt; *h_map;
      public:
          template&lt;class EQ,class HF&gt;MyClass()
          { h_map = new unordered_map&lt;void*,void*,HF,EQ&gt;(); }
  
          MyClass(int (*h)(const void*),int (*cmp)(void*,void*))
          { h_map = new unordered_map&lt;void*,void*,hash_fun,eq_fun&gt;(0,hash_fun(h),eq_fun(cmp)); }
  };
  </code></pre>