4 extern "C" void abort(void);
6 #define CI(stmt) try { stmt; abort(); } catch (int) { }
17 int PI(int& i) { return i++; }
19 int main(int argc, char *argv[])
21 (argc+1 ? has_destructor() : throw 0);
22 CI((argc+1 ? throw 0 : has_destructor()));
23 CI((0 ? has_destructor() : throw 0));
24 CI((1 ? throw 0 : has_destructor()));
25 (0 ? throw 0 : has_destructor());
26 (1 ? has_destructor() : throw 0);
28 (argc+1 ? no_destructor() : throw 0);
29 CI((argc+1 ? throw 0 : no_destructor()));
30 CI((0 ? no_destructor() : throw 0));
31 CI((1 ? throw 0 : no_destructor()));
32 (0 ? throw 0 : no_destructor());
33 (1 ? no_destructor() : throw 0);
39 (1 ? 0 : throw PI(i));
42 CI(0 ? 0 : throw PI(i));
45 CI(0 ? has_destructor() : throw PI(i));
47 (argc+1 ? has_destructor() : throw PI(i));
57 CI(0 ? 0 : throw i++);
60 CI(0 ? has_destructor() : throw i++);
62 (argc+1 ? has_destructor() : throw i++);