1 2 3 4 5 6 7 8 9 10 11 12
#include <exception> #include <stdexcept> #include <cassert> #include <cstring> int main() { using namespace std; exception lhs; bad_exception rhs; lhs = rhs; assert( strcmp(lhs.what(), rhs.what()) == 0 ); }
1 2 3
t: t.cpp:12: int main(): Assertion `strcmp(lhs.what(), rhs.what()) == 0' failed. Disallowed system call: SYS_kill