1 #include <cassert> 2 #include <cstdlib> 3 #include <exception> 4 expected_terminate()5void expected_terminate() { 6 exit(0); 7 } 8 main()9int main() { 10 std::set_terminate(expected_terminate); 11 try { 12 std::unexpected(); 13 assert(false); 14 } catch (...) { 15 assert(false); 16 } 17 assert(false); 18 return 1; 19 } 20