2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / defaulted52.C
blobc617230b493a6185ace89bf6e2a6a4060039f2ca
1 // Core Issue #1331 (const mismatch with defaulted copy constructor)
2 // { dg-do compile { target c++11 } }
4 struct M
6   M();
7   // So that W wouldn't have had "const W&" copy ctor if it were
8   // implicitly declared.
9   M(M&);
12 template<typename T> struct W
14   W();
15   // This should now compile and be =deleted.
16   W(const W&) = default;
17   T t;
20 W<M> w;