title: Pointers as keys in map C++ STL
body: <p>I have a question on how pointers to a custom object are handled when used as Keys in an map. More specifically if I define </p>
  
  <pre><code>std::map&lt; CustomClass*, int &gt; foo;
  </code></pre>
  
  <p>Would the default C++ implementation work to handle these pointers? Or do I need to define a custom comparator function to handle it? In general, is it good practice to use pointers to objects as keys?</p>