From: Jason Merrill Date: Tue, 29 Aug 2006 04:42:46 +0000 (-0400) Subject: re PR c++/27714 (operator new as friend in template class rejected) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb6e56215c46410b8e3422dd10d2eab27df148bd;p=gcc.git re PR c++/27714 (operator new as friend in template class rejected) PR c++/27714 * pt.c (push_template_decl_real): A friend template with class scope isn't primary. From-SVN: r116551 --- diff --git a/gcc/testsuite/g++.dg/template/new7.C b/gcc/testsuite/g++.dg/template/new7.C new file mode 100644 index 00000000000..dcf8a8e595e --- /dev/null +++ b/gcc/testsuite/g++.dg/template/new7.C @@ -0,0 +1,9 @@ +// PR c++/27714 + +template struct A +{ + static void* operator new(__SIZE_TYPE__); + template friend void* A::operator new(__SIZE_TYPE__); +}; + +A a;