News for hackers. Stuff that matters.
Re:New school C by pcwalton on Wednesday December 26, 2012 @02:57PM (#4970610)
No, this is not true. Until C++ can reason carefully about aliasing, it can't be memory-safe. Iterator invalidation and reference invalidation are the key problems here.

Rather than repeat the code examples in detail, I'll link to some earlier examples I've shown:

http://news.ycombinator.com/item?id=4724781

http://news.ycombinator.com/item?id=4724421

Basically, they come down to references and iterators not knowing about aliasing, thus being unable to determine when the referent is destroyed.

There are no comments on this comment yet.