elide2.c

来自「用于进行gcc测试」· C语言 代码 · 共 35 行

C
35
字号
// PR c++/13944// Verify that we still call terminate() if we do run the copy constructor,// and it throws.// { dg-do run }#include <cstdlib>#include <exception>struct A{  A() { }  A(const A&) { throw 1; }};A a;voidgood_terminate() { std::exit (0); }int main(){  std::set_terminate (good_terminate);  try    {      throw a;    }  catch (...)    {      return 2;    }  return 3;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?