4 ms·
One behavioral change in C++11 is the noexcept specifier; with user-defined destructors defaulting to noexcept(true). If you have pre-C++11 code throwing except
by pveierland 10y ago
One behavioral change in C++11 is the noexcept specifier; with user-defined destructors defaulting to noexcept(true). If you have pre-C++11 code throwing exceptions from within a destructor, e.g. to signal a violated postcondition contract, the program will terminate when such an exception is thrown after compiling the program as C++11.
Updating the code to function under C++11 requires adding a noexcept(false) specification to throwing destructors.