2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / defaulted55.C
blob04cfc17200060f56c3afd198efc2592c8b1c9173
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(W&) = default;
14   // T1 and T2 may have differing ref-qualifiers (copy assign op).
15   constexpr W& operator=(const W&) && = default; // { dg-error "defaulted" "" { target c++11_down } }
16   T t;
19 W<M> w;