3 ms·
There isn't much difference between references and pointers. That is the problem.
by roca 7y ago
There isn't much difference between references and pointers. That is the problem.
- ncmncm 7y agoA reference only ever points at one thing, from birth to death, and it always points at something.
- roca 7y agoNo, it is entirely possible to delete the underlying object so a reference is left dangling. See https://github.com/isocpp/CppCoreGuidelines/issues/1038 https://github.com/isocpp/CppCoreGuidelines/issues/1038 for example.