3 ms·
Raw pointers are fine in many contexts, especially when a reference would not do (e.g. when it's optional).
by Koshkin 6y ago
Raw pointers are fine in many contexts, especially when a reference would not do (e.g. when it's optional).
- whimsicalism 6y ago> Raw pointers are fine in many contexts, especially when a reference would not do (e.g. when it's optional). I didn't say "always use references", I said, never use raw pointers. Since shared_ptrs can be null, I don't see why this is a valid counterargument.