When is it OK to throw an exception from a destructor in C++?

后端 未结 7 1272
独厮守ぢ
独厮守ぢ 2020-12-16 23:33

I know the rule is to NEVER throw one during a destructor, and I understand why. I would not dare do it. But even the C++ Faq Lite says that this rule is good 99% of the tim

7条回答
  •  臣服心动
    2020-12-17 00:14

    If everything's so knackered that you want to cause the program to terminate via the exception code flow.

提交回复
热议问题