Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/initlist121.C

raw
1 // PR c++/93922
2 // { dg-do link { target c++11 } }
3
4 template <typename T>
5 struct A {
6 A () {}
7 template <typename U>
8 A (A<U> const &) {}
9 ~A () {}
10 };
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; };
15
16 A<B>
17 bar (B *)
18 {
19 return A<B> ();
20 }
21
22 S *
23 foo (B *x, B const &y)
24 {
25 return new S {bar (x), y};
26 }
27
28 int
29 main ()
30 {
31 }