the purpose of the -Wlifetime flag?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 17:38:39

问题


What is the purpose of the -Wlifetime compile flag in clang?

The information I found on the Internet about it are very vague. Is this any noticeable feature?


回答1:


This flag analyzes the local file to see if the code may use pointers to objects that are dead. You can see Herb Sutter cppcon video on YouTube where he explains this very well: https://youtu.be/80BZxujhY38



来源:https://stackoverflow.com/questions/52662135/the-purpose-of-the-wlifetime-flag

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!