Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / cpp0x / variadic73.C
blob7bff85b50374cdd2aa24832619614bc1d711fdfe
1 // { dg-do "run" }
2 // { dg-options "-std=gnu++0x" }
3 struct A {};
4 struct B {};
5 struct C {};
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();
13 extern "C" void abort();
15 int main()
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;