Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp0x/defaulted57.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
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 }; |