binary1248/SFGUI — comment on commit 4929df2ae58abf692d14407280d568008efee988
File: include/SFGUI/Signal.hpp line 54
By binary1248:

Erasing something in the vector causes it's children to move yes, but you would still have to search for the element with the correct serial in the vector to find the delegate you want, just as it was before. As such, as long as you keep hold of the serial you will always be able to access the delegate. If you look carefully, the vector is never accessed by the [] operator besides when iterating over the whole vector. Internally std::map also stores pairs of values. The only difference is that it's [] operator implies a search whereas with std::vector you would have to do std::find yourself.