source: trunk/testcase/throw.cpp@ 822

Last change on this file since 822 was 575, checked in by bird, 22 years ago

* empty log message *

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 694 bytes
Line 
1#include <stdio.h>
2
3
4class foo
5{
6 int i;
7public:
8 foo(int i) : i(i)
9 {
10 fprintf(stderr, "constructor 1\n");
11 }
12
13 foo() throw(int) : i(1)
14 {
15 fprintf(stderr, "constructor 2\n");
16 throw(1);
17 }
18
19 int get() const
20 {
21 return i;
22 }
23
24};
25
26
27static foo o2(2);