Menu

#26 Add correct noexcept specification to throwing destructors

SVN
open
nobody
None
5
2017-07-23
2017-07-23
Hodorgasm
No

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.

1 Attachments

Discussion


Log in to post a comment.