How to create a struct with fields which reference each other

I reckon self-referentials are also easy to do in C++ correctly, without shared_ptr, because you can use the move constructor to update the required fields. Small string/array implementations do this quite often. (It's still likely that you will forget some of the fields and get UB, but it doesn't require to run circles like it does in Rust.)