Tell me more ×  I have a multiset with a custom predicate
function, e.g multiset<MyClass *,MyCompFunc> where MyCompFunc
looks at an attribute on the MyClass objects. During the
progress of the application, the objects might change in a way
that should cause them to be reordered.  What's the correct way
to get the multiset to become reordered when this happens?
Manually sort it, or remove the modified object, update it, and
re-insert it?  share|improve this question I usually remove it
and re-insert it, but I'm just going to put this as a comment
instead of an answer, because I'm sure there's a better way. – 
Ken Simon Sep 3 '10 at 18:12 I'm pretty sure you have to remove
the object that's about to be modified, then modify it, then re-
insert it. But I can't find a reference in the C++ spec right
now that says you can't modify the Key of an entry in an
associative container. –  Steve Jessop Sep 3 '10 at 18:17 Maybe
this is what Steve was referring to: The fundamental property of
iterators of associative contain