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

后端 未结 7 1257
独厮守ぢ
独厮守ぢ 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:13

    Just don't do it. If the stars and planets align in such a way that you find you need to...

    Still don't do it.

提交回复
热议问题