Lines Matching refs:C2
43 struct C2 struct
48 explicit C2(int id) : B(id-2), id_(id) {count++;} in C2() argument
49 C2(const C2& a) : B(a.id_-2), id_(a.id_) {count++;} in C2() argument
50 ~C2() {count--;} in ~C2() argument
53 int C2::count = 0;
56 : C1, C2
60 explicit A(int id) : C1(id-1), C2(id-2), B(id+3), id_(id) {count++;} in A()
61 A(const A& a) : C1(a.id_-1), C2(a.id_-2), B(a.id_+3), id_(a.id_) {count++;} in A()
71 assert(C2::count == 0); in f1()
76 assert(C2::count == 1); in f1()
81 assert(static_cast<C2&>(a).id_ == 3); in f1()
93 assert(C2::count == 0); in f2()
102 assert(static_cast<const C2&>(a).id_ == 3); in f2()
110 catch (const C2&) in f2()
126 assert(C2::count == 0); in f3()
140 catch (const C2&) in f3()
152 assert(C2::count == 0); in f4()
157 catch (const C2& c2) // can catch C2 in f4()
178 assert(C2::count == 0); in f5()
193 catch (const C2&) in f5()
211 assert(C2::count == 0); in main()