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