fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Foo
  5. {
  6. Foo() { throw 1; }
  7. };
  8.  
  9. int main() {
  10. try
  11. {
  12. throw Foo();
  13. }
  14. catch(const Foo &)
  15. {
  16. cout << "Foo\n";
  17. }
  18. catch(const int &)
  19. {
  20. cout << "int\n";
  21. }
  22. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
int