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
* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
elide1.C
blob
6875c82561b4b34107e0374b7c87a25abe2d2be6
1
// { dg-options -std=c++17 }
2
3
struct A
4
{
5
A();
6
A(const A&) = delete;
7
};
8
9
bool b;
10
A a = A();
11
A a1 = b ? A() : A();
12
A a2 = (42, A());
13
14
A f();
15
A a3 = f();
16
A a4 = b ? A() : f();
17
18
void g(A);
19
A f() {
20
g(A());
21
if (b)
22
throw A();
23
else
24
return A();
25
}
26
27
A* ap = new A(f());
28
29
struct B {
30
A a;
31
B(): a(A()) {}
32
};