15:Understand the costs of exception handling.(More Effective C++)

The prudent course of action is to be aware of the costs described in this item, but not to take the numbers very seriously. Whatever the cost of exception handling, you don't want to pay any more than you have to. To minimize your exception-related costs, compile without support for exceptions when that is feasible; limit your use of try blocks and exception specifications to those locations where you honestly need them; and throw exceptions only under conditions that are truly exceptional.

原文链接: https://www.cnblogs.com/zhtf2014/archive/2011/09/30/2196327.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    15:Understand the costs of exception handling.(More Effective C++)

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/33364

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月8日 上午10:30
下一篇 2023年2月8日 上午10:30

相关推荐