aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/init/new33.C
blob: 18da79e7e9a3dceea3571d94b345b953f2f0bd93 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/53356
// { dg-do compile }

struct A {};
struct B { operator const A & () const; };
struct C { operator const A & () const; C (); };
struct D { operator const A & () const; D (); ~D (); };

A *foo () { return new A (B ()); }
A *bar () { return new A (C ()); }
A *baz () { return new A (D ()); }