title: std::unordered_set of pointers
body: <p>I have the following struct</p>
  
  <pre><code>struct MyClass {
      int myInt;
      std::map&lt;int, int&gt; myMap;
  };
  </code></pre>
  
  <p>I want to use <code>unordered_set&lt;MyClass*, PointedObjHash, PointedObEq&gt;</code> but I can't find a valid way to declare <code>PointedObEq</code>.</p>
  
  <p>I tried</p>
  
  <pre><code>struct PointedObjHash {
      size_t operator() (MyClass* const&amp; c) const {
          std::size_t seed = 0;
          boost::hash_combine(seed, c-&gt;myInt);
          boost::hash_combine(seed, c-&gt;myMap);
          return seed;
      }
  </code></pre>
  
  <p>and I hope it is fine, but I can't find a way to declare <code>PointedObjEq</code></p>
  
  <p>--- EDIT ---</p>
  
  <p>If declare operator== inside the class debug never breaks, but I think 'cause MyClass == MyClass* never happens...</p>
  
  <pre><code>struct MyClass {
      ...
      ...
      bool operator==(MyClass* const&amp; c) {
          return this-&gt;myInt == c-&gt;myInt &amp; this-&gt;myMap == c-&gt;myMap;
      }
  </code></pre>