Well, you're in luck then! You don't even need a 'modern' successor, C++ (even the ancient versions) disallow null references.
Well, you're in luck then! You don't even need a 'modern' successor, C++ (even the ancient versions) disallow null references.
That's useful, until you realise that all its smart pointers are semantically nullable (they can all be empty with the same result as a null raw pointer) and then nothing's actually fixed.
For fairly low values of those. Creating a null reference is UB, your program is not legal at all.
The whole point is to NOT have it be accepted.
Which is a textbook example of the null reference problem.
Edit: There may be some terminological confusion here: when programming language folks talk about "references", they include in that definition what C/C++ call "pointers". See for example the Wikipedia article, which gives as the C++ example not C++ references, but C++ pointers.
Since nobody stopped you, the problem is still there.