blob: 920a4ad0c6d282fd37c697ff6242217b580d159c [file] [log] [blame]
// Core Issue #1331 (const mismatch with defaulted copy constructor)
// { dg-do compile { target c++11 } }
struct M
{
M() = default;
M& operator=(M&);
};
template<typename T> struct W
{
W() = default;
W& operator=(const W&) = default; // { dg-error "binding" }
T t;
};
int
main ()
{
W<M> w1, w2;
w1 = w2; // { dg-error "use of deleted function" }
}