I just a naive question here: how hard would it be to design smart pointers, dedicated to self-reference, that would automatically update themselves when the self-referential struct containing them is moved around? The idea is to trade a little bit of runtime performance to keep safe self-referential structs.
When I write “how hard would it be”, I don’t mean “I think it wouldn’t be too hard”, I really mean “I have no idea what this would imply in terms of low-level implementation of the
move operation”. Any thoughts on this?