2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / init / new9.C
blob6729d76fd00cb420461ea4f2e3a3fa66ae4e7890
1 // PR 12337
3 class A {};
5 template <typename T>
6 class X : public A {
7 public:
8   X(T&);
9 };
11 class B {
12 public:
13   bool foo(A*);
14   template <typename T>
15   bool foo(T& t) { return foo(new X<T>(t)); }
18 int main()
20   B x, y;
21   x.foo(y);