logoalt Hacker News

jeffbee • today at 4:32 PM • 1 reply • view on HN

Object lifetime is the entire point of C++ and it solves ~100% of the emergent flaws in C programs.


Replies

accelbred • today at 4:41 PM

I was just dealing with this: https://bugs.gentoo.org/show_bug.cgi?id=974323.

Also std::start_lifetime_at is a hack and ive seen nobody using it in all the placed where it aught to be used.

If optimizing based on object lifetimes could be turned off, itd be turned off everywhere for hardening like strict aliasing is.

➕ show 1 reply