repo.or.cz
/
official-gcc
/
graphite-test-results.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove outermost loop parameter.
[official-gcc/graphite-test-results.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
variadic73.C
blob
7bff85b50374cdd2aa24832619614bc1d711fdfe
1
// { dg-do "run" }
2
// { dg-options "-std=gnu++0x" }
3
struct A {};
4
struct B {};
5
struct C {};
6
7
template<typename... Exceptions> void f(int idx) throw(Exceptions...) {
8
if (idx == 0) throw A();
9
else if (idx == 1) throw B();
10
else if (idx == 2) throw C();
11
}
12
13
extern "C" void abort();
14
15
int main()
16
{
17
try {
18
f<A, B, C>(0);
19
abort();
20
} catch (A) {
21
}
22
try {
23
f<A, B, C>(1);
24
abort();
25
} catch (B) {
26
}
27
try {
28
f<A, B, C>(2);
29
abort();
30
} catch (C) {
31
}
32
return 0;
33
}