Hacker News new | ask | show | jobs
by pcwalton 4724 days ago
Iterator invalidation, returning references that outlive their referent, storing references in data structures that outlive their referent, invalidation of the "this" pointer, etc.
1 comments

Basically those are examples of bare pointer manipulations (as references are essentially syntactically sugared bare pointers).

Although it can be mitigated with specially written collections (incompatible with the standard collections) and strict coding guidelines, I have to agree with you that the C++ memory model itself is insanely dangerous.