repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
initlist121.C
blob
c12006cab1d5f5d21049fca7a073d8b15d9951c5
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
}