Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But C++ can express that, with compiler extensions:

https://godbolt.org/z/ohxaGzsEM



That's cool.

Last I remember, the lifetime profile stuff was there, but there was still no way to add your own annotations. For some reason, I didn't hear too much about any of this, it was

- clang is working on it

- clang is working on it

- clang is working on it

- Visual Studio has it

- clang is working on it

- Silence

gcc still has nothing, right?


I have just taken a look... https://wg21.link/p1179 is actually still not there, right? I see some interesting stuff in https://discourse.llvm.org/t/rfc-lifetime-annotations-for-c/... from last year. But, in general... once Herb started the whole Lifetime safety profile thing, there seemed to be a lot of interest, but for the last few years things seems to have died? I think things are better with Visual Studio, but being on Linux... I may need to start developing for Linux from Visual Studio with WSL2 :-(


Only VC++ is working on it, the clang tidy developer looking into lifetime has moved on.


That's just sad.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: