When compiling in C++11/14, destructors default to noexcept(true)
. Any throw statement in a destructor becomes a call to std::terminate()
and building with gcc flag -Werror=terminate
causes build failure. Such destructors should be modified to either not throw or to enable equivalent pre-C++98 throwing behaviour by being marked as noexcept(false)
. The patch opts for the latter.