2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / defaulted56.C
blobe7ce12c556672c55252d1f6fe91ea8814ab53636
1 // Core Issue #1331 (const mismatch with defaulted copy constructor)
2 // { dg-do compile { target c++11 } }
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&.
7 struct S
9   constexpr S(S &) = default;
12 struct T
14   constexpr T(volatile T &) = default; // { dg-error "defaulted" }
17 struct U
19   constexpr U(const volatile U &) = default; // { dg-error "defaulted" }
22 struct V
24   constexpr V(const V &) = default;