1 // Core Issue #1331 (const mismatch with defaulted copy constructor) 2 // { dg-do compile { target c++11 } } 3 4 struct M 5 { 6 M(); 7 // So that W wouldn't have had "const W&" copy ctor if it were 8 // implicitly declared. 9 M(M&); 10 }; 11 12 template<typename T> struct W 13 { 14 W(); 15 // This should now compile and be =deleted. 16 W(const W&) = default; 17 T t; 18 }; 19 20 W<M> w; 21