7 enum region
{ oriental
, egyptian
, greek
, etruscan
, roman
};
13 typedef region antiquities
;
20 gnu_obj_1(antiquities a
, long l
): test(true), key1(5), key2(l
), value(a
) {}
25 class gnu_obj_2
: public virtual gnu_obj_1
28 antiquities value_derived
;
30 gnu_obj_2(antiquities b
): gnu_obj_1(oriental
, 7), value_derived(b
) { }
38 typedef region antiquities
;
41 gnu_obj_3(antiquities b
): data(etruscan
) { }
49 gnu_obj_2
<long> test2(roman
);
50 gnu_obj_3
<long> test3(greek
);
56 throw gnu_obj_1(egyptian
, 4589); // marker 1-throw
58 catch (gnu_obj_1
& obj
)
61 if (obj
.value
!= egyptian
) // marker 1-catch
75 ++j
; // marker 2-start
82 throw gnu_obj_1(egyptian
, 4589); // marker 2-throw
84 catch (gnu_obj_1
& obj
)
87 if (obj
.value
!= egyptian
) // marker 2-catch
93 catch (gnu_obj_1
& obj
)
96 if (obj
.value
!= egyptian
)
108 // 3 use standard library
113 throw invalid_argument("gdb.1"); // marker 3-throw
115 catch (exception
& obj
)
117 if (obj
.what() != "gdb.1") // marker 3-catch