dtor1.c

来自「gcc3.2.1源代码」· C语言 代码 · 共 36 行

C
36
字号
// PR c++/411// Test that a fully-constructed base is destroyed before transferring// control to the handler of a function-try-block.// { dg-do run { xfail *-*-* } }int ad;int r;struct A {  ~A() { ++ad; }};struct B: public A {  ~B();};B::~B ()try  {    throw 1;  }catch (...)  {    if (!ad)      r = 1;    return;  }int main (){  { B b; }  return r;}

⌨️ 快捷键说明

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