terminate
from being called during the stack-unwinding part of exception propagation. Second, it helps ensure that destructors always accomplish everything they are supposed to accomplish. Each argument is convincing in its own right, but together, the case is ironclad.Item 11:Prevent exceptions from leaving destructors.(More Effective C++)
转载
We thus find ourselves with two good reasons for keeping exceptions from propagating out of destructors. First, it prevents
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:Item 14:Use exception specifications judiciously.(More Effective C++)
下一篇:Item 13:Catch exceptions by reference.(More Effective C++)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
《More Effective C++ 》笔记
条款10 防止构造函数里的资源泄露条款20 协助编译器实现返回值优化条款22 考虑使用op=来取代单独的op运算符条款26 限制类对象的个数条款27 要求或禁止对象分配在堆上
构造函数 类对象 编译器 运算符 javascript