1 // Test that the default B copy constructor calls the deleted A 2 // copy constructor. 3 // { dg-do compile { target c++11 } } 4 5 struct A // { dg-message "declares a move" } 6 { 7 A() = default; 8 A(A&&) = default; 9 template <class T> AA10 A(const T& t) { t.i; } 11 }; 12 13 struct B: A { }; // { dg-error "implicitly|use of deleted" } 14 main()15int main() 16 { 17 B b; 18 B b2(b); // { dg-error "deleted" } 19 } 20