repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
decomp38.C
blob
769318e89763a8318581d3f26b699809f6634c08
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
}