Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / g++.dg / cpp0x / inh-ctor12.C
1 // { dg-options "-std=c++11" }
2 // { dg-do run }
3
4 struct A
5 {
6   int i;
7   template <class T>
8   A(T t) noexcept : i(t) {}
9 };
10
11 struct C
12 {
13   C() { throw 42; }
14 };
15
16 struct B: A, C
17 {
18   using A::A;
19 };
20
21 int main()
22 {
23   try { B b(24); }
24   catch (int) { return 0; }
25   __builtin_abort();
26 }