fork download
  1. #include <iostream>
  2. #include <exception>
  3. using namespace std;
  4.  
  5. struct T
  6. {
  7. ~T()
  8. {
  9. cout << "~T()";
  10. throw 1;
  11. }
  12. };
  13.  
  14. int main()
  15. {
  16. try
  17. {
  18. T t[10];
  19. }
  20. catch(int)
  21. {
  22. cout << "catch";
  23. }
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0.01s 2812KB
stdin
Standard input is empty
stdout
~T()catch