1 // Core Issue #1331 (const mismatch with defaulted copy constructor)
2 // { dg-do compile { target c++11 } }
3 
4 // If T2 (what would be the implicit declaration) has a parameter of
5 // type const C&, the corresponding parameter of T1 may be of type C&.
6 
7 struct S
8 {
9   S& operator=(S &) = default;
10 };
11 
12 struct T
13 {
14   T& operator=(volatile T &) = default; // { dg-error "defaulted" }
15 };
16 
17 struct U
18 {
19   U& operator=(const volatile U &) = default; // { dg-error "defaulted" }
20 };
21 
22 struct V
23 {
24   V& operator=(const V &) = default;
25 };
26