ReactOS
0.4.15-dev-2092-gf04890c
rethrow4.cpp
Go to the documentation of this file.
1
// Copyright (c) Microsoft. All rights reserved.
2
// Licensed under the MIT license. See LICENSE file in the project root for
3
// full license information.
4
5
#include <stdio.h>
6
int
c
,
d
;
7
struct
A
8
{
9
int
i
;
10
A
() {
i
= ++
c
;
printf
(
"A() %d\n"
,
i
); }
11
A
(
const
A
&) {
i
= ++
c
;
printf
(
"A(const A&) %d\n"
,
i
); }
12
~A
() {
printf
(
"~A() %d\n"
,
i
); ++
d
; }
13
};
14
int
15
main
()
16
{
17
try
18
{
19
try
20
{
21
printf
(
"Throwing 1...\n"
);
22
throw
A
();
23
}
24
catch
(
A
)
25
{
26
try
27
{
28
printf
(
"Throwing 2...\n"
);
29
throw
;
30
}
31
catch
(
A
)
32
{
33
printf
(
"Throwing 3...\n"
);
34
throw
A
();
35
}
36
}
37
}
38
catch
(
A
)
39
{
40
printf
(
"Caught.\n"
);
41
}
42
printf
(
"c == %d, d == %d\n"
,
c
,
d
);
43
return
c
!=
d
;
44
}
A::A
A()
Definition:
rethrow4.cpp:10
main
int main()
Definition:
rethrow4.cpp:15
A
Definition:
ehthrow.cxx:92
A::A
A(const A &)
Definition:
rethrow4.cpp:11
d
int d
Definition:
rethrow4.cpp:6
A
#define A(row, col)
A::i
int i
Definition:
ehthrow.cxx:95
c
int c
Definition:
rethrow4.cpp:6
c
const GLubyte * c
Definition:
glext.h:8905
A::~A
~A()
Definition:
rethrow4.cpp:12
printf
#define printf
Definition:
config.h:203
modules
rostests
apitests
compiler
ms
eh
rethrow4.cpp
Generated on Fri Feb 26 2021 06:07:54 for ReactOS by
1.8.15