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

This reminds me of the -Wlifetime proposal, which provides similar checks but requires annotation of ownership at struct level (hence the check only applies to new structs):

An example: https://github.com/llvm/llvm-project/blob/main/clang/test/Se...

More details can be found at https://herbsutter.com/2018/09/20/lifetime-profile-v1-0-post...

Unfortunately it was never upstreamed according to https://github.com/mgehre/llvm-project/issues/98



There's a lot of overlap between the authors and implementors, and this proposal has extensive comparisons with the -Wlifetime one!




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

Search: