comparison gcc/testsuite/g++.dg/cpp1z/decomp38.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 // { dg-do compile { target c++17 } }
2
3 class X
4 {
5 int a, b;
6 void f()
7 {
8 auto[x,y] = *this;
9 }
10 };
11
12 class X2
13 {
14 int a, b;
15 void f(X2& other)
16 {
17 auto[x,y] = other;
18 }
19 };
20
21 struct X3
22 {
23 friend void foo();
24 private:
25 int a;
26 };
27
28 void foo()
29 {
30 X3 x;
31 auto [a] = x;
32 }
33
34 struct X4
35 {
36 int a;
37 };
38
39 struct X5 : private X4
40 {
41 friend void foo2();
42 };
43
44 void foo2() {
45 X5 x;
46 auto [a] = x;
47 }