Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / initlist121.C
blobc12006cab1d5f5d21049fca7a073d8b15d9951c5
1 // PR c++/93922
2 // { dg-do link { target c++11 } }
4 template <typename T>
5 struct A {
6   A () {}
7   template <typename U>
8   A (A<U> const &) {}
9   ~A () {}
11 int t;
12 struct B {};
13 struct C : B { C (B const &) { if (t) throw 1; } };
14 struct S { A<B const> x; C y; };
16 A<B>
17 bar (B *)
19   return A<B> ();
22 S *
23 foo (B *x, B const &y)
25   return new S {bar (x), y};
28 int
29 main ()