Transitioning to C++11 where destructors are implicitly declared with noexcept
问题 In C++11, a destructor without any exception specification is implicitly declared with noexcept , which is a change from C++03. Therefore, a code which used to throw from destructors in C++03 would still compile fine in C++11, but will crash at runtime once it attempts throwing from such a destructor. Since there's no compile-time error with such a code, how could it be safely transitioned to C++11, short of declaring all and every existing destructor in the code base as being noexcept(false)