aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/inh-ctor12.C
blob: 257487efb112daec31d8ff065d8740bd8c2d0334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-options "-std=c++11" }
// { dg-do run }

struct A
{
  int i;
  template <class T>
  A(T t) noexcept : i(t) {}
};

struct C
{
  C() { throw 42; }
};

struct B: A, C
{
  using A::A;
};

int main()
{
  try { B b(24); }
  catch (int) { return 0; }
  __builtin_abort();
}