title: Update STL Priority Queue when modifying references to internal data
body: <p>Lets say I am writing <a href="http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm">Dijkstra's Algorithm</a>, and I have a priority queue that is keeping the shortest distance node on the top. However as I traverse the graph I will be updating the distance to that vertex. I have placed references to all vertices in the priority queue that are contained in the data structure. Now as I update the vertices in the data structure, I would like for the data in the priority queue to adapt to those changes, so the nearest node is always on top. However, after stepping through my application with the debugger, I have noticed that the priority queue does not update itself. How do I get it to do this, without re-inserting all vertices back into it?</p>