From: Jason Merrill Date: Sun, 4 Jun 2000 02:02:19 +0000 (-0400) Subject: expand X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a50d89174fd0dfee1a44807234d3fce13a72f89;p=gcc.git expand From-SVN: r34385 --- diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp96.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp96.C index caeceea1d9f..66e9a4486a6 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp96.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp96.C @@ -1,17 +1,33 @@ -// Build don't link: +// Test for partial specialization of a member function template. // Origin: Jason Merrill template struct A { - template void f(U); + template int f(U) { return 42; } }; template <> template -void A::f(U); +int A::f(U); -A a; +template <> +template +int A::f(U) { return 24; } -void g () +int main () { - a.f (3); + A ai; + if (ai.f(0) != 42) + return 1; + + A ad; + if (ad.f(0) != 24) + return 1; + + A ac; + if (ac.f(0) != 36) + return 1; } + +template <> +template +int A::f(U) { return 36; }