I have a set declared with my own comp function:
set<int, my_comp> my_set;
The comparison function uses some data stored elsewhere to decide which int is greater. If said data changes, the order of the elements of the set changes too.
How does set handle that? If I know the relative position of an int may have changed, do I have to remove and reinsert it again?
Details: in particular, my_comp uses the ints as indexs to access a vector and compares the values contained in the vector. Said values are bound to change.