Lines Matching refs:Base2
669 struct Base2 : Bottom {
670 constexpr Base2(const int &r) : r(r) {}
674 struct Derived : Base, Base2 {
675 constexpr Derived() : Base(76), Base2(a) {}
684 constexpr Base base2(76);
694 static_assert(derived == base2, "");
697 constexpr Bottom &bot2 = (Base2&)derived;
701 constexpr Bottom *pb2 = (Base2*)&derived;
706 constexpr Base2 &fail = (Base2&)bot1; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Class::Derived' to type 'Class::Base2'}}
708 constexpr Base2 &ok2 = (Base2&)bot2;
711 constexpr Base2 *pfail = (Base2*)pb1; // expected-error {{constant expression}} expected-note {{cannot cast object of dynamic type 'const Class::Derived' to type 'Class::Base2'}}
713 constexpr Base2 *pok2 = (Base2*)pb2;
716 static_assert((Base2*)(Derived*)(Base*)pb1 == pok2, "");