fork download
  1. #include <iostream>
  2.  
  3. struct A {
  4. ~A() noexcept(false) {
  5. throw 1;
  6. }
  7. };
  8.  
  9. int main() {
  10. try {
  11. A a;
  12. } catch (...) {
  13. std::cout << "Ok" << std::endl;
  14. }
  15. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Ok