title: Best practice for storing object in multiple containers
body: <p>I want to store an object in both a <code>priority_queue</code> but also in an <code>unordered_map</code>. Is there a best practice for doing something like this? I've considered storing the objects in a separate container (say <code>array</code>), and then relinquishing the pointers to the other two containers.</p>
  
  <p>I'm hesitant to do this though, because that would mean I would have to write some additional comparitors to handle the fact that the containers would be storing pointers, rather than actual objects. In addition there is addition work managing ownership of the objects I'd like to not have to deal with.</p>
  
  <p>So, I'm wondering if there isn't already an established best way to do this?</p>