2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / defaulted54.C
blobf8ddc4e47ceca1cf29c81543aab584df8aa50e53
1 // Core Issue #1331 (const mismatch with defaulted copy constructor)
2 // { dg-do compile { target c++11 } }
4 struct M
6   M();
7   M(M&);
8 };
10 template<typename T> struct W
12   W();
13   W(const W&) = default; // { dg-error "binding" }
14   T t;
17 W<M> w;
18 W<M> w2 = w; // { dg-error "use of deleted function" }