fork download
  1. int f() { throw 0; }
  2.  
  3. struct A {
  4. int a;
  5. A() : a(f()) {}
  6. };
  7.  
  8. struct B {
  9. int b;
  10. B() try : b(f()) {
  11. } catch(int e) {
  12. }
  13. };
  14.  
  15. int main() ??<
  16. B b;
  17. return 0;
  18. ??>
Runtime error #stdin #stdout #stderr 0s 3468KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'int'