Lines Matching refs:C2
52 struct C2 struct
57 explicit C2(int id) : B(id-2), id_(id) {count++;} in C2() argument
58 C2(const C2& a) : B(a.id_-2), id_(a.id_) {count++;} in C2() argument
59 ~C2() {count--;} in ~C2() argument
62 int C2::count = 0;
65 : C1, C2
69 explicit A(int id) : C1(id-1), C2(id-2), id_(id) {count++;} in A()
70 A(const A& a) : C1(a.id_-1), C2(a.id_-2), id_(a.id_) {count++;} in A()
80 assert(C2::count == 0); in f1()
85 assert(C2::count == 1); in f1()
90 assert(static_cast<C2&>(a).id_ == 3); in f1()
92 assert(static_cast<B&>(static_cast<C2&>(a)).id_ == 1); in f1()
103 assert(C2::count == 0); in f2()
112 assert(static_cast<const C2&>(a).id_ == 3); in f2()
114 assert(static_cast<const B&>(static_cast<const C2&>(a)).id_ == 1); in f2()
121 catch (const C2&) in f2()
137 assert(C2::count == 0); in f3()
152 catch (const C2&) in f3()
164 assert(C2::count == 0); in f4()
173 catch (const C2& c2) // can catch C2 in f4()
197 assert(C2::count == 0); in main()