c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / template / ctor7.C
blobee65172fe75b2384e3ff51dde5946dba3075f3da
1 // PR c++/27640
3 template < class T > struct refcounted : 
4 virtual T
6   template < class A1 > refcounted (const A1 & a1) : T () { }
7 };
8 struct nfsserv {};
9 template < class T >
10 void
11 sfsserver_cache_alloc (int *ns)
13   new refcounted < nfsserv > (*ns);
15 void
16 usage ()
18   sfsserver_cache_alloc < int > ( 0);