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() function
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), id_(id) {count++;} in A()
61 A(const A& a) : C1(a.id_-1), C2(a.id_-2), 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()
83 assert(static_cast<B&>(static_cast<C2&>(a)).id_ == 1); in f1()
94 assert(C2::count == 0); in f2()
103 assert(static_cast<const C2&>(a).id_ == 3); in f2()
105 assert(static_cast<const B&>(static_cast<const C2&>(a)).id_ == 1); in f2()
112 catch (const C2&) in f2()
128 assert(C2::count == 0); in f3()
143 catch (const C2&) in f3()
155 assert(C2::count == 0); in f4()
164 catch (const C2& c2) // can catch C2 in f4()
188 assert(C2::count == 0); in main()