|
|
|
|
|
by gcp
3212 days ago
|
|
Other than out of bounds memory accesses and legacy code I feel there is not much that can go wrong. If only we could stop at single-threaded applications :-) I'm not convinced modern C++ stops all issues with pointers/iterators and ownership either. But it's hard to tell because every large-enough application inevitable has to interface with legacy pointer code. |
|
What it does do is make it easy to reason about how pointers are used across the application. Also worth noting that even with legacy libraries, you can wrap a given pointer with std::unique_ptr or std::shared_ptr and provide a custom deleter and maintain reasonable safety guarantees.